do_browser() - added space and - keys for page down and up

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@464 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Chris Allegretta 2001-01-08 21:14:04 +00:00
parent bf69261597
commit 8eac3b5069
2 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,8 @@ CVS code -
real_dir_from_tilde()
- Oops, fix case where buf ="~", silly crash (bug discovered by
Neil Parks).
do_browser()
- Added space and - keys to do page up and down.
nano 0.9.25 - 01/07/2001
General -

View File

@ -1265,6 +1265,7 @@ char *do_browser(char *inpath)
case NANO_PREVPAGE_KEY:
case NANO_PREVPAGE_FKEY:
case KEY_PPAGE:
case '-':
if (lineno % editwinrows == 0) {
if (selected - (editwinrows * width) >= 0)
@ -1282,6 +1283,7 @@ char *do_browser(char *inpath)
case NANO_NEXTPAGE_KEY:
case NANO_NEXTPAGE_FKEY:
case KEY_NPAGE:
case ' ':
if (lineno % editwinrows == 0) {
if (selected + (editwinrows * width) <= numents - 1)
selected += editwinrows * width;