README.md | 5 +++-- noice.c | 6 ++++++ diff --git a/README.md b/README.md index 1617dcd20b88be012b4929abad3b9cc376087813..fa8bcd2905734c5da5b6f389135507dd610b9ca1 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,9 @@ - Open a file with `vim` or `less` ### Fork toppings -- Behaviour +- Behaviour and navigation - 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 - Environment variable `NOICE_OPENER` to override all associations and open all files with your desktop environments default file opener. Examples: @@ -97,7 +98,7 @@ | `c` | change dir | | `.` | toggle hide dot files | | `t` | toggle sort by modified time | | `!` | spawn a shell in current dir | -| `e` | edit item in `vi` | +| `e` | edit item in `vim` | | `p` | open item with `less` pager | | `z` | run `top` | | `Ctrl-l` | redraw window | diff --git a/noice.c b/noice.c index e9e4e653b203366a07b295581c9268868dfa53cc..2d562ae8831fd0ceea4d5a0681d355082bc6a9ec 100644 --- a/noice.c +++ b/noice.c @@ -746,10 +746,16 @@ goto begin; case SEL_NEXT: if (cur < ndents - 1) cur++; + else if (ndents) + /* Roll over, set cursor to first entry */ + cur = 0; break; case SEL_PREV: if (cur > 0) cur--; + else if (ndents) + /* Roll over, set cursor to last entry */ + cur = ndents - 1; break; case SEL_PGDN: if (cur < ndents - 1)