do_browser() - More Picoish keystrokes for the browser, ^P, ^N, etc, for up, down, etc, and add the consistent ^C to exit (Jim Knoble)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@710 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
df20e83412
commit
a2c02e9c8d
|
@ -87,6 +87,8 @@ Cvs code -
|
|||
- Added the "Goto Directory" code (Rocco)
|
||||
- Don't shift the size of the file is it's less than 1K. Fixed
|
||||
files less than 1K being displayed as 0B (Rocco).
|
||||
- More Picoish keystrokes for the browser, ^P, ^N, etc, for up,
|
||||
down, etc, and add the consistent ^C to exit (Jim Knoble).
|
||||
do_writeout()
|
||||
- New code to allow writing selected text to a separate file.
|
||||
When this is done, the current state is prserved.
|
||||
|
|
10
files.c
10
files.c
|
@ -1298,22 +1298,28 @@ char *do_browser(char *inpath)
|
|||
break;
|
||||
#endif
|
||||
#endif
|
||||
case NANO_UP_KEY:
|
||||
case KEY_UP:
|
||||
case 'u':
|
||||
if (selected - width >= 0)
|
||||
selected -= width;
|
||||
break;
|
||||
case NANO_BACK_KEY:
|
||||
case KEY_LEFT:
|
||||
case NANO_BACKSPACE_KEY:
|
||||
case 127:
|
||||
case 'l':
|
||||
if (selected > 0)
|
||||
selected--;
|
||||
break;
|
||||
case KEY_DOWN:
|
||||
case NANO_DOWN_KEY:
|
||||
case 'd':
|
||||
if (selected + width <= numents - 1)
|
||||
selected += width;
|
||||
break;
|
||||
case KEY_RIGHT:
|
||||
case NANO_FORWARD_KEY:
|
||||
case 'r':
|
||||
if (selected < numents - 1)
|
||||
selected++;
|
||||
|
@ -1353,7 +1359,7 @@ char *do_browser(char *inpath)
|
|||
selected = numents - 1;
|
||||
break;
|
||||
case KEY_ENTER:
|
||||
case NANO_CONTROL_M:
|
||||
case NANO_ENTER_KEY:
|
||||
case 's': /* More Pico compatibility */
|
||||
case 'S':
|
||||
|
||||
|
@ -1427,11 +1433,11 @@ char *do_browser(char *inpath)
|
|||
return do_browser(path);
|
||||
|
||||
/* Stuff we want to abort the browser */
|
||||
case NANO_CONTROL_C:
|
||||
case 'q':
|
||||
case 'Q':
|
||||
case 'e': /* Pico compatibility, yeech */
|
||||
case 'E':
|
||||
case NANO_CANCEL_KEY:
|
||||
case NANO_EXIT_FKEY:
|
||||
abort = 1;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue