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.
master
Benno Schulenberg 2020-03-13 19:30:04 +01:00
parent 067ee1a6b1
commit 4dedb1c1b1
1 changed files with 1 additions and 1 deletions

View File

@ -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. */