Allowing 'firstline' and 'lastline' to be rebound to Ctrl keys.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5020 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Benno Schulenberg 2014-06-25 09:17:38 +00:00
parent 0c0fbd585c
commit 40ae394b6a
2 changed files with 4 additions and 6 deletions

View File

@ -2,6 +2,7 @@
* src/browser.c (do_browser): Allow 'firstfile' and 'lastfile' to be
rebound to Ctrl keys -- checking meta_key is wrong, the function has
already been determined, that is all that matters.
* src/help.c (do_help): Same thing for 'firstline'/'lastline'.
2014-06-23 Benno Schulenberg <bensberg@justemail.net>
* src/nano.h, src/move.c (do_up, do_down), src/winio.c (edit_scrol):

View File

@ -158,13 +158,10 @@ void do_help(void (*refresh_func)(void))
if (line + (editwinrows - 1) < last_line)
line++;
} else if (f->scfunc == do_first_line) {
if (meta_key)
line = 0;
line = 0;
} else if (f->scfunc == do_last_line) {
if (meta_key) {
if (line + (editwinrows - 1) < last_line)
line = last_line - (editwinrows - 1);
}
if (line + (editwinrows - 1) < last_line)
line = last_line - (editwinrows - 1);
} else if (f->scfunc == do_exit) {
/* Exit from the help browser. */
break;