nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 02f1fec497b0aa247f124a9ad2cd37e4ee3c824c
parent a102e45e90f4e443de0767a94271100195a12c96
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun,  3 Jan 2021 13:52:31 +0100

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.

Diffstat:
Msrc/prompt.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/prompt.c b/src/prompt.c @@ -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));