diff options
-rw-r--r-- | linenoise/linenoise.c | 4 | ||||
-rw-r--r-- | txr.1 | 13 |
2 files changed, 2 insertions, 15 deletions
diff --git a/linenoise/linenoise.c b/linenoise/linenoise.c index ffbd38e4..0ea057ab 100644 --- a/linenoise/linenoise.c +++ b/linenoise/linenoise.c @@ -338,12 +338,10 @@ static int complete_line(lino_t *ls) { if (i == lc.len) generate_beep(ls); break; case CTL('C'): - c = 0; - /* fallthrough */ - case ESC: /* Re-show original buffer */ if (i < lc.len) refresh_line(ls); stop = 1; + c = 0; break; default: /* Update buffer and return */ @@ -33624,21 +33624,10 @@ in. The other completions may be viewed one by one using the Tab key. When the completions are exhausted, the original uncompleted line is shown again, and Tab can continue to be used to cycle through the completions again. In completion mode, the Ctrl-C character acts as a command to cancel completion mode -and return to editing the original uncompleted line. The ESC character -similarly cancels completion, restoring the original line, but unlike Ctrl-C, -it is then processed in regular editing mode. Any other input character causes +and return to editing the original uncompleted line. Any other input character causes the listener to keep the currently shown completion, and return to edit mode, where that that character is processed again as a command. -Note: the peculiar behavior for the ESC character in completion mode is -intended to handles situations in which an arrow key is used while in -completion mode. When any arrow key is pressed, the line is restored and then -the arrow key is processed in ordinary mode (translating to an editing -movement or history navigation). The connection between ESC and arrow keys -is that arrow keys (and other special command keys) are represented, by a -VT100-compatible terminal or terminal emulator, as special sequences of -bytes beginning with ESC (known as "escape sequences"). - .SS* Reading Forms Directly from the Terminal The listener is currently line oriented. There is, however, support for |