mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Alt+Esc to quit context from filter prompt
This commit is contained in:
parent
46e1d6bdda
commit
4ea0d70217
17
src/nnn.c
17
src/nnn.c
|
@ -3002,18 +3002,13 @@ static int filterentries(char *path, char *lastname)
|
||||||
case KEY_MOUSE:
|
case KEY_MOUSE:
|
||||||
goto end;
|
goto end;
|
||||||
#endif
|
#endif
|
||||||
case ESC: /* Exit filter mode on Esc and Alt+key */
|
case ESC:
|
||||||
if (handle_alt_key(ch) != ERR) {
|
if (handle_alt_key(ch) != ERR) {
|
||||||
if (*ch == ESC) { /* Handle Alt+Esc */
|
if (*ch == ESC) /* Handle Alt+Esc */
|
||||||
if (wln[1]) {
|
*ch = 'q'; /* Quit context */
|
||||||
ln[REGEX_MAX - 1] = ln[1];
|
else {
|
||||||
ln[1] = wln[1] = '\0';
|
|
||||||
ndents = total;
|
|
||||||
*ch = CONTROL('L');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
unget_wch(*ch);
|
unget_wch(*ch);
|
||||||
*ch = ';';
|
*ch = ';'; /* Run plugin */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -4597,7 +4592,7 @@ static void show_help(const char *path)
|
||||||
"cq Quit context%-6c2Esc ^Q Quit\n"
|
"cq Quit context%-6c2Esc ^Q Quit\n"
|
||||||
"c? Help, conf\n"
|
"c? Help, conf\n"
|
||||||
"1FILTER & PROMPT\n"
|
"1FILTER & PROMPT\n"
|
||||||
"c/ Filter%-12cAlt+Esc Clear filter & redraw\n"
|
"c/ Filter%-12cAlt+Esc Unfilter, quit context\n"
|
||||||
"aEsc Exit prompt%-12c^L Clear prompt/last filter\n"
|
"aEsc Exit prompt%-12c^L Clear prompt/last filter\n"
|
||||||
"b^N Toggle type-to-nav%-0c\n"
|
"b^N Toggle type-to-nav%-0c\n"
|
||||||
"1FILES\n"
|
"1FILES\n"
|
||||||
|
|
Loading…
Reference in a new issue