diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-01-28 19:39:03 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-01-28 19:39:03 -0800 |
commit | 499708ec41e69fefdfee1f9db1bbcfbc7db5b87f (patch) | |
tree | 7902fca2260b1f03c9cc2f92e56da529b5692216 /match.c | |
parent | dc611e17c14040fa0530ed28c33919c1aa4a270e (diff) | |
download | txr-499708ec41e69fefdfee1f9db1bbcfbc7db5b87f.tar.gz txr-499708ec41e69fefdfee1f9db1bbcfbc7db5b87f.tar.bz2 txr-499708ec41e69fefdfee1f9db1bbcfbc7db5b87f.zip |
linenoise: Ctrl-V Ctrl-J now inserts CR not LF.
If newlines are inserted into the input, they don't behave
well. The is_balanced_line callback doesn't recognize them as
line terminators for the purposes of delimiting ; comments.
Also, they make a mess in the ~/.txr_history file.
Plus, users of shells like Bash are used to Ctrl-V Ctrl-J
inserting a line break; some users have that in their muscle
memory. So let's just do that as a special case: Ctrl-V Ctrl-J
behaves like Ctrl-V Ctrl-M.
* linenoise/linenoise.c (history_search, edit): Remap a
verbatim Ctrl-J to a carriage return.
Diffstat (limited to 'match.c')
0 files changed, 0 insertions, 0 deletions