mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
Clear rename prompt with Ctrl-L
This commit is contained in:
parent
4196af94f7
commit
776d782fcf
|
@ -221,7 +221,7 @@ To cook yourself, download the [latest stable release](https://github.com/jarun/
|
||||||
o | Open dir in file manager
|
o | Open dir in file manager
|
||||||
p | Open entry in PAGER
|
p | Open entry in PAGER
|
||||||
^K | Invoke file path copier
|
^K | Invoke file path copier
|
||||||
^L | Force a redraw, unfilter
|
^L | Redraw, clear prompt
|
||||||
? | Show help, settings
|
? | Show help, settings
|
||||||
Q | Quit and change dir
|
Q | Quit and change dir
|
||||||
q, ^Q | Quit
|
q, ^Q | Quit
|
||||||
|
|
2
nnn.1
2
nnn.1
|
@ -94,7 +94,7 @@ Open current entry in PAGER (fallback less)
|
||||||
.It Ic ^K
|
.It Ic ^K
|
||||||
Invoke file path copier
|
Invoke file path copier
|
||||||
.It Ic ^L
|
.It Ic ^L
|
||||||
Force a redraw, unfilter
|
Redraw, clear prompt
|
||||||
.It Ic \&?
|
.It Ic \&?
|
||||||
Toggle help and settings screen
|
Toggle help and settings screen
|
||||||
.It Ic Q
|
.It Ic Q
|
||||||
|
|
8
nnn.c
8
nnn.c
|
@ -1033,6 +1033,12 @@ xreadline(char *fname)
|
||||||
if (*ch == KEY_ENTER || *ch == '\n' || *ch == '\r')
|
if (*ch == KEY_ENTER || *ch == '\n' || *ch == '\r')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (*ch == CONTROL('L')) {
|
||||||
|
clearprompt();
|
||||||
|
len = pos = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (pos < buflen) {
|
if (pos < buflen) {
|
||||||
memmove(buf + pos + 1, buf + pos, (len - pos) << 2);
|
memmove(buf + pos + 1, buf + pos, (len - pos) << 2);
|
||||||
buf[pos] = *ch;
|
buf[pos] = *ch;
|
||||||
|
@ -1655,7 +1661,7 @@ show_help(char *path)
|
||||||
"eo | Open dir in file manager\n"
|
"eo | Open dir in file manager\n"
|
||||||
"ep | Open entry in PAGER\n"
|
"ep | Open entry in PAGER\n"
|
||||||
"d^K | Invoke file path copier\n"
|
"d^K | Invoke file path copier\n"
|
||||||
"d^L | Force a redraw, unfilter\n"
|
"d^L | Redraw, clear prompt\n"
|
||||||
"e? | Show help, settings\n"
|
"e? | Show help, settings\n"
|
||||||
"eQ | Quit and change dir\n"
|
"eQ | Quit and change dir\n"
|
||||||
"aq, ^Q | Quit\n\n");
|
"aq, ^Q | Quit\n\n");
|
||||||
|
|
Loading…
Reference in a new issue