in do_help(), don't allow moving down a page when the last line of the

help text is onscreen


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3810 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2006-07-23 19:57:30 +00:00
parent 1dc7c1225a
commit ec177be416
2 changed files with 3 additions and 1 deletions

View File

@ -109,6 +109,8 @@ CVS code -
- help.c: - help.c:
do_help() do_help()
- Simplify screen update handling and exiting. (DLR) - Simplify screen update handling and exiting. (DLR)
- Don't allow moving down a page when the last line of the help
text is onscreen. (DLR)
- move.c: - move.c:
do_scroll_up(), do_scroll_down() do_scroll_up(), do_scroll_down()
- Fix problems where, after scrolling, the previous and current - Fix problems where, after scrolling, the previous and current

View File

@ -148,7 +148,7 @@ void do_help(void (*refresh_func)(void))
line = 0; line = 0;
break; break;
case NANO_NEXTPAGE_KEY: case NANO_NEXTPAGE_KEY:
if (line + (editwinrows - 2) <= last_line) if (line + (editwinrows - 1) < last_line)
line += editwinrows - 2; line += editwinrows - 2;
break; break;
case NANO_PREVLINE_KEY: case NANO_PREVLINE_KEY: