summaryrefslogtreecommitdiffstats
path: root/linenoise/LICENSE
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-20 16:25:10 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-20 16:25:10 -0700
commit18f016a0e577982d9d78ec7133b3b53ff218da93 (patch)
treeef980aca6a684caccfa0f79202be6d686e4cd678 /linenoise/LICENSE
parent3df312a334ad3b2dbd146e5fb8b2bd2f9e086165 (diff)
downloadtxr-18f016a0e577982d9d78ec7133b3b53ff218da93.tar.gz
txr-18f016a0e577982d9d78ec7133b3b53ff218da93.tar.bz2
txr-18f016a0e577982d9d78ec7133b3b53ff218da93.zip
linenoise: undo feature.
* linenoise/linenoise.c (LINENOISE_MAX_UNDO): New preprocessor symbol. (struct lino_state): New member, undo_stack. (struct lino_undo): New struct type. (free_undo, record_undo, record_triv_undo, restore_undo): New static functions. (edit_insert): Record trivial undo item with record_triv_undo. (edit_insert_str, edit_history_next, edit_delete, edit_backspace, edit_delete_prev_all, edit_delete_prev_word, edit_in_editor): Record undo item. (edit): Record undo item before Ctrl-R history recall and Ctrl-T twiddle. Also record one final undo item upon Enter, as well as Ctrl-C. New Ctrl-O command to undo. (lino_copy): Do not copy undo_stack, to prevent double freeing. (lino_free): Free the undo history. * txr.1: Documented.
Diffstat (limited to 'linenoise/LICENSE')
0 files changed, 0 insertions, 0 deletions