in reset_statusbar_cursor(), fix cursor placement problem by modeling

the code more closely after reset_cursor()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3185 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-11-16 03:14:11 +00:00
parent 9d3a468ad8
commit cfffbf71ce
3 changed files with 12 additions and 7 deletions

View File

@ -136,17 +136,20 @@ CVS code -
- prompt.c:
do_statusbar_input()
- Fix misplaced break when handling NANO_VERBATIM_KEY. (DLR)
reset_statusbar_cursor()
- Fix cursor placement problem by modeling the code more closely
after reset_cursor(). (DLR)
- rcfile.c:
do_rcfile()
- Remove unneeded assert. (DLR)
- search.c:
findnextstr()
- Remove parameter can_display_wrap, as it's always set to TRUE
now, and rename parameter wholeword to whole_word for
now, and rename parameter wholeword to whole_word, for
consistency. (DLR)
do_replace_loop()
- Change order of parameters to more closely match those of
findnextstr(), and rename parameter wholewords to whole_word
findnextstr(), and rename parameter wholewords to whole_word,
for consistency. (DLR)
- text.c:
begpar()
@ -169,6 +172,8 @@ CVS code -
- winio.c:
nanoget_repaint()
- Rename parameter inputbuf to buf, for consistency. (DLR)
reset_cursor()
- Rename variable x to xpt, to avoid confusion. (DLR)
update_line()
- Remove now-unneeded logic that set the index parameter to zero
if the fileptr parameter didn't point to current. (DLR)

View File

@ -692,10 +692,10 @@ void update_statusbar_line(const char *curranswer, size_t index)
void reset_statusbar_cursor(void)
{
size_t start_col = strlenpt(prompt) + 1;
size_t page_start = get_statusbar_page_start(start_col,
start_col + statusbar_x);
size_t xpt = statusbar_xplustabs();
wmove(bottomwin, 0, start_col + statusbar_x + 1 - page_start);
wmove(bottomwin, 0, start_col + 1 + xpt -
get_statusbar_page_start(start_col, start_col + xpt));
}
/* Return TRUE if we need an update after moving horizontally, and FALSE

View File

@ -2200,8 +2200,8 @@ void reset_cursor(void)
openfile->current_y = openfile->current->lineno -
openfile->edittop->lineno;
if (openfile->current_y < editwinrows) {
size_t x = xplustabs();
wmove(edit, openfile->current_y, x - get_page_start(x));
size_t xpt = xplustabs();
wmove(edit, openfile->current_y, xpt - get_page_start(xpt));
}
}