diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2018-03-03 19:19:06 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2018-03-03 19:19:06 +0530 |
commit | 43134cdfa88f1092c18dea3095adac7a5944cf7a (patch) | |
tree | 1e27f709a68d3b7f9ddf9ac38b46e2f2f506f71c /nnn.c | |
parent | 209415763093bb4504275761fcd1640f06fbd290 (diff) | |
download | nnn-43134cdfa88f1092c18dea3095adac7a5944cf7a.tar.gz |
Support ~, - and & keyboard shortcuts at the bookmark prompt.
In nav-as-you-type mode only control keys are understood when filter is enabled.
We need some way to quicly jump HOME, last visited dir or start dir.
Diffstat (limited to 'nnn.c')
-rw-r--r-- | nnn.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -2726,9 +2726,15 @@ nochange: printprompt("key: "); tmp = readinput(); clearprompt(); - if (tmp == NULL) + if (tmp == NULL || tmp[0] == '\0') break; + /* Interpret ~, - and & keys */ + if ((tmp[1] == '\0') && (tmp[0] == '~' || tmp[0] == '-' || tmp[0] == '&')) { + presel = tmp[0]; + goto begin; + } + if (get_bm_loc(tmp, newpath) == NULL) { printmsg(messages[STR_INVBM_ID]); goto nochange; |