mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Handle all ^ chars in main loop
This commit is contained in:
parent
33cec52d4e
commit
18deea6383
9
nnn.c
9
nnn.c
|
@ -1135,6 +1135,13 @@ filterentries(char *path)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r == OK) {
|
if (r == OK) {
|
||||||
|
/* Handle all control chars in main loop */
|
||||||
|
if (keyname(*ch)[0] == '^') {
|
||||||
|
if (len == 1)
|
||||||
|
cur = oldcur;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
switch (*ch) {
|
switch (*ch) {
|
||||||
case '\r': // with nonl(), this is ENTER key value
|
case '\r': // with nonl(), this is ENTER key value
|
||||||
if (len == 1) {
|
if (len == 1) {
|
||||||
|
@ -1147,6 +1154,7 @@ filterentries(char *path)
|
||||||
|
|
||||||
redraw(path);
|
redraw(path);
|
||||||
goto end;
|
goto end;
|
||||||
|
#if 0
|
||||||
case CONTROL('L'): // fallthrough
|
case CONTROL('L'): // fallthrough
|
||||||
case CONTROL('K'): // fallthrough
|
case CONTROL('K'): // fallthrough
|
||||||
case CONTROL('Y'): // fallthrough
|
case CONTROL('Y'): // fallthrough
|
||||||
|
@ -1165,6 +1173,7 @@ filterentries(char *path)
|
||||||
if (len == 1)
|
if (len == 1)
|
||||||
cur = oldcur;
|
cur = oldcur;
|
||||||
goto end;
|
goto end;
|
||||||
|
#endif
|
||||||
case '?': // '?' is an invalid regex, show help instead
|
case '?': // '?' is an invalid regex, show help instead
|
||||||
if (len == 1) {
|
if (len == 1) {
|
||||||
cur = oldcur;
|
cur = oldcur;
|
||||||
|
|
Loading…
Reference in a new issue