diff --git a/ChangeLog b/ChangeLog index fc8d99166139b869c519825e5f1d0d4ed24a2d84..70e3d193fec75b7c2c1cf54bd415a28a395680db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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) diff --git a/src/prompt.c b/src/prompt.c index c2db21bceda13f80d878cc354adc3460f85baae8..5d08f04e768879ffb7fc17619607165e1e692867 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -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 diff --git a/src/winio.c b/src/winio.c index 9b0d5ba2e4e9dbf65512f4d2b87fdbe6289092d7..6cee66f5475deb79c4cf0c0538c99d713a3eb662 100644 --- a/src/winio.c +++ b/src/winio.c @@ -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)); } }