mirror of
https://github.com/jarun/nnn.git
synced 2025-03-18 20:39:45 +00:00
Add keys to move to the first and last entry
This commit is contained in:
parent
4db0d0dae0
commit
dcde076371
3 changed files with 20 additions and 0 deletions
|
@ -45,6 +45,14 @@ struct key bindings[] = {
|
||||||
/* Page up */
|
/* Page up */
|
||||||
{ KEY_PPAGE, SEL_PGUP },
|
{ KEY_PPAGE, SEL_PGUP },
|
||||||
{ CONTROL('U'), SEL_PGUP },
|
{ CONTROL('U'), SEL_PGUP },
|
||||||
|
/* Home */
|
||||||
|
{ KEY_HOME, SEL_HOME },
|
||||||
|
{ CONTROL('A'), SEL_HOME },
|
||||||
|
{ '^', SEL_HOME },
|
||||||
|
/* End */
|
||||||
|
{ KEY_END, SEL_END },
|
||||||
|
{ CONTROL('E'), SEL_END },
|
||||||
|
{ '$', SEL_END },
|
||||||
/* Change dir */
|
/* Change dir */
|
||||||
{ 'c', SEL_CD },
|
{ 'c', SEL_CD },
|
||||||
/* Toggle sort by time */
|
/* Toggle sort by time */
|
||||||
|
|
4
noice.1
4
noice.1
|
@ -37,6 +37,10 @@ Move to next entry.
|
||||||
Scroll up half a page.
|
Scroll up half a page.
|
||||||
.It Ic [Pgdown] or C-d
|
.It Ic [Pgdown] or C-d
|
||||||
Scroll down half a page.
|
Scroll down half a page.
|
||||||
|
.It Ic [Home] or C-a or ^
|
||||||
|
Move to the first entry.
|
||||||
|
.It Ic [End] or C-e or $
|
||||||
|
Move to the last entry.
|
||||||
.It Ic l, [Right], [Return] or C-m
|
.It Ic l, [Right], [Return] or C-m
|
||||||
Open file or enter directory.
|
Open file or enter directory.
|
||||||
.It Ic h, [Left] or [Backspace]
|
.It Ic h, [Left] or [Backspace]
|
||||||
|
|
8
noice.c
8
noice.c
|
@ -54,6 +54,8 @@ enum action {
|
||||||
SEL_PREV,
|
SEL_PREV,
|
||||||
SEL_PGDN,
|
SEL_PGDN,
|
||||||
SEL_PGUP,
|
SEL_PGUP,
|
||||||
|
SEL_HOME,
|
||||||
|
SEL_END,
|
||||||
SEL_CD,
|
SEL_CD,
|
||||||
SEL_MTIME,
|
SEL_MTIME,
|
||||||
SEL_REDRAW,
|
SEL_REDRAW,
|
||||||
|
@ -827,6 +829,12 @@ moretyping:
|
||||||
if (cur > 0)
|
if (cur > 0)
|
||||||
cur -= MIN((LINES - 4) / 2, cur);
|
cur -= MIN((LINES - 4) / 2, cur);
|
||||||
break;
|
break;
|
||||||
|
case SEL_HOME:
|
||||||
|
cur = 0;
|
||||||
|
break;
|
||||||
|
case SEL_END:
|
||||||
|
cur = n - 1;
|
||||||
|
break;
|
||||||
case SEL_CD:
|
case SEL_CD:
|
||||||
/* Read target dir */
|
/* Read target dir */
|
||||||
printprompt("chdir: ");
|
printprompt("chdir: ");
|
||||||
|
|
Loading…
Add table
Reference in a new issue