diff options
-rw-r--r-- | linenoise/linenoise.c | 6 | ||||
-rw-r--r-- | txr.1 | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/linenoise/linenoise.c b/linenoise/linenoise.c index e61ba49d..78a3446f 100644 --- a/linenoise/linenoise.c +++ b/linenoise/linenoise.c @@ -2212,12 +2212,14 @@ static int edit(lino_t *l, const wchar_t *prompt) } break; } + /* fallthrough */ + l->save_hist_idx = l->history_index; + case CTL('F'): + ret = l->len; if (l->mlmode) edit_move_end(l); if (l->need_refresh) refresh_line(l); - ret = l->len; - l->save_hist_idx = l->history_index; goto out; case '?': extended = 0; @@ -71427,6 +71427,16 @@ such a line .B is entered into the history. +The listener does not allow lines containing certain bad syntax to be submitted +with Enter. If the buffer contains an expression with unbalanced parentheses +or brackets, or unterminated literals, then Enter generates a newline character +which is inserted into the buffer. In that situation, if that newline character +is being added at the very end of the buffer, the listener flashes the +exclamation mark character (!) two times to warn the user that line has not +been submitted: no computation is taking place, and the listener is waiting for +more input. It is possible to force the submission of an unbalanced line using +the sequence Ctrl-X, Ctrl-F. + .SS* Limitations The interactive listener can only accept up to 4095 abstract characters of |