diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-12 23:39:28 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-12 23:39:28 -0700 |
commit | 1bdd343418bdf65f8c7aa95ed21d6d0fe4730237 (patch) | |
tree | ee4d2150c3a70085b8f47efadf765aa26abf2e32 /linenoise | |
parent | db7a6684a1212f8a900b1a07bb2e9c4c87cd9586 (diff) | |
download | txr-1bdd343418bdf65f8c7aa95ed21d6d0fe4730237.tar.gz txr-1bdd343418bdf65f8c7aa95ed21d6d0fe4730237.tar.bz2 txr-1bdd343418bdf65f8c7aa95ed21d6d0fe4730237.zip |
linenoise: incorrect ESC treatment in completion.
* linenoise/linenoise.c (complete_line): ESC must not be
treated specially when leaving completion mode; it must
accept the completed line. The original code did this wrong
in my opinion and I propagated the error.
* txr.1: Remove all mention of special ESC treatment
in completion mode.
Diffstat (limited to 'linenoise')
-rw-r--r-- | linenoise/linenoise.c | 4 |
1 files changed, 1 insertions, 3 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 */ |