mirror of
https://github.com/jarun/nnn.git
synced 2025-01-24 17:56:41 +00:00
Press TAB to insert current file name at prompt
This commit is contained in:
parent
4b4355c733
commit
3f07a8ca76
|
@ -3457,8 +3457,11 @@ static char *xreadline(const char *prefill, const char *prompt)
|
||||||
memmove(buf + pos - 1, buf + pos,
|
memmove(buf + pos - 1, buf + pos,
|
||||||
(len - pos) * WCHAR_T_WIDTH);
|
(len - pos) * WCHAR_T_WIDTH);
|
||||||
--len, --pos;
|
--len, --pos;
|
||||||
} // fallthrough
|
}
|
||||||
case '\t': /* Tab breaks cursor position, ignore it */
|
continue;
|
||||||
|
case '\t':
|
||||||
|
if (!(len || pos) && ndents)
|
||||||
|
len = pos = mbstowcs(buf, pdents[cur].name, READLINE_MAX);
|
||||||
continue;
|
continue;
|
||||||
case CONTROL('F'):
|
case CONTROL('F'):
|
||||||
if (pos < len)
|
if (pos < len)
|
||||||
|
|
Loading…
Reference in a new issue