avoid unnecessary scrolling when moving to the last line of the help

text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3548 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2006-05-22 02:23:56 +00:00
parent ef0d5a7637
commit 6fe4e2be04
1 changed files with 4 additions and 2 deletions

View File

@ -131,8 +131,10 @@ void do_help(void (*refresh_func)(void))
line = 0;
break;
case NANO_LASTLINE_ALTKEY:
if (meta_key && last_line > editwinrows)
line = last_line - (editwinrows - 1);
if (meta_key) {
if (line + (editwinrows - 1) < last_line)
line = last_line - (editwinrows - 1);
}
break;
}