From 4dedb1c1b111166481e7ae27565ff35edd481755 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 13 Mar 2020 19:30:04 +0100 Subject: [PATCH] moving: do not put the cursor at end-of-line when in a help text Keeping the invisible cursor at the left edge avoids any line getting scrolled horizontally. This fixes https://savannah.gnu.org/bugs/?57991. Bug existed since version 2.8.2, since the help texts got generated and displayed in a different way in order to become searchable. --- src/move.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/move.c b/src/move.c index 9f770289..88b2261b 100644 --- a/src/move.c +++ b/src/move.c @@ -37,7 +37,7 @@ void to_first_line(void) void to_last_line(void) { openfile->current = openfile->filebot; - openfile->current_x = strlen(openfile->filebot->data); + openfile->current_x = (inhelp) ? 0 : strlen(openfile->filebot->data); openfile->placewewant = xplustabs(); /* Set the last line of the screen as the target for the cursor. */