diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-03-28 17:28:44 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-03-28 17:28:44 -0700 |
commit | edd182e778e116f2c2c62fbc09102372b0c03500 (patch) | |
tree | f0efdfc0af2fd9d7f2fab10be2eecafebea69736 /linenoise | |
parent | 6e916b2f987a5340fe1e0f0ff70e2bde533a793b (diff) | |
download | txr-edd182e778e116f2c2c62fbc09102372b0c03500.tar.gz txr-edd182e778e116f2c2c62fbc09102372b0c03500.tar.bz2 txr-edd182e778e116f2c2c62fbc09102372b0c03500.zip |
linenoise: command to force submission of unbalanced line.
* linenoise.c (edit): Handle Ctrl-F in extended mode so that
Ctrl-X Ctrl-F forces the line to be submitted without a
balance check.
* txr.1: Document previously undocumented balance check,
including the flashing exclamation mark. Document Ctrl-X
Ctrl-F.
Diffstat (limited to 'linenoise')
-rw-r--r-- | linenoise/linenoise.c | 6 |
1 files changed, 4 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; |