mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Implement navigation roll over
This commit is contained in:
parent
e67e78f9f1
commit
ad0fb1df8c
|
@ -42,8 +42,9 @@ I chose to fork noice because:
|
||||||
|
|
||||||
### Fork toppings
|
### Fork toppings
|
||||||
|
|
||||||
- Behaviour
|
- Behaviour and navigation
|
||||||
- Case-insensitive alphabetic content listing instead of upper case first.
|
- Case-insensitive alphabetic content listing instead of upper case first.
|
||||||
|
- Roll over at the first and last entries of a directory (with Up/Down keys).
|
||||||
- File associations
|
- File associations
|
||||||
- Environment variable `NOICE_OPENER` to override all associations and open all files with your desktop environments default file opener. Examples:
|
- Environment variable `NOICE_OPENER` to override all associations and open all files with your desktop environments default file opener. Examples:
|
||||||
|
|
||||||
|
@ -97,7 +98,7 @@ Start noice (default: current directory):
|
||||||
| `.` | toggle hide dot files |
|
| `.` | toggle hide dot files |
|
||||||
| `t` | toggle sort by modified time |
|
| `t` | toggle sort by modified time |
|
||||||
| `!` | spawn a shell in current dir |
|
| `!` | spawn a shell in current dir |
|
||||||
| `e` | edit item in `vi` |
|
| `e` | edit item in `vim` |
|
||||||
| `p` | open item with `less` pager |
|
| `p` | open item with `less` pager |
|
||||||
| `z` | run `top` |
|
| `z` | run `top` |
|
||||||
| `Ctrl-l` | redraw window |
|
| `Ctrl-l` | redraw window |
|
||||||
|
|
6
noice.c
6
noice.c
|
@ -746,10 +746,16 @@ nochange:
|
||||||
case SEL_NEXT:
|
case SEL_NEXT:
|
||||||
if (cur < ndents - 1)
|
if (cur < ndents - 1)
|
||||||
cur++;
|
cur++;
|
||||||
|
else if (ndents)
|
||||||
|
/* Roll over, set cursor to first entry */
|
||||||
|
cur = 0;
|
||||||
break;
|
break;
|
||||||
case SEL_PREV:
|
case SEL_PREV:
|
||||||
if (cur > 0)
|
if (cur > 0)
|
||||||
cur--;
|
cur--;
|
||||||
|
else if (ndents)
|
||||||
|
/* Roll over, set cursor to last entry */
|
||||||
|
cur = ndents - 1;
|
||||||
break;
|
break;
|
||||||
case SEL_PGDN:
|
case SEL_PGDN:
|
||||||
if (cur < ndents - 1)
|
if (cur < ndents - 1)
|
||||||
|
|
Loading…
Reference in a new issue