prompt: restore a workaround for a cursor misplacement bug in ncurses

When making small movements in the lower right corner, ncurses can
get confused about where the cursor actually is -- a double-width
character seems to throw its calculations off.

This addresses https://savannah.gnu.org/bugs/?59808.

Bug existed since version 5.4, commit 39705c60.
master
Benno Schulenberg 2021-01-03 13:52:31 +01:00
parent a102e45e90
commit 02f1fec497
1 changed files with 6 additions and 0 deletions

View File

@ -407,6 +407,12 @@ void draw_the_promptbar(void)
wattroff(bottomwin, interface_color_pair[PROMPT_BAR]);
/* Work around a cursor-misplacement bug -- https://sv.gnu.org/bugs/?59808. */
if (ISSET(NO_HELP)) {
wmove(bottomwin, 0, 0);
wrefresh(bottomwin);
}
/* Place the cursor at the right spot. */
column = base + wideness(answer, typing_x);
wmove(bottomwin, 0, column - get_statusbar_page_start(base, column));