diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-11 18:27:03 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-11 18:40:02 +0100 |
commit | 16f989bd0dcf1e6ff538edad92d203b0860b62ad (patch) | |
tree | 72857306543272e97a0c97d36352ada5ab126afb | |
parent | be760fcd24d882627488b691661a1cb09c3edcb1 (diff) | |
download | sciteco-16f989bd0dcf1e6ff538edad92d203b0860b62ad.tar.gz |
<CTL/U> immediate editing command to rubout current string param
when not in string-state, <CTL/U> is self inserting (unlike traditional
TECO where it would clear your entire commandline)
-rw-r--r-- | src/cmdline.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmdline.cpp b/src/cmdline.cpp index a1f8e44..aabf9e5 100644 --- a/src/cmdline.cpp +++ b/src/cmdline.cpp @@ -176,6 +176,15 @@ process_edit_cmd(gchar key) *insert = '\0'; break; + case CTL_KEY('U'): + if (States::is_string()) { + while (strings[0] && strlen(strings[0]) > 0) + undo.pop(macro_pc--); + cmdline[macro_pc] = '\0'; + *insert = '\0'; + } + break; + case CTL_KEY('T'): if (States::is_string()) { const gchar *filename = last_occurrence(strings[0]); |