aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cmdline.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-01 23:49:59 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-02 00:03:49 +0100
commit482c0e7fbd5ea28bd32e968d7c027fdc9fbbbe23 (patch)
tree0e40a82c06526cc4a33b46adc7f3a66d787229a9 /src/cmdline.h
parent83ebaea1abc39cae990e0fd22b6e4b428abfa95f (diff)
downloadsciteco-482c0e7fbd5ea28bd32e968d7c027fdc9fbbbe23.tar.gz
introduced the ^G immediate editing command for toggling the undo/redo mode (also replaces ^T)
* CTRL+G toggles the behaviour of the rubout (Backspace, ^W, ^U) commands: When the so called immediate editing command modifier is enabled/active, the rubout commands will do the opposite and insert from the rubbed out command line. This command is somewhat similar to Emacs' C-g command. * The CTRL+G command also replaces the ^T immediate editing command for auto-completing filenames in any string argument. Now the TAB key can be used for that purpose after activating the ^G modifier. ^T is a classic TECO command that will be supported sooner or later by SciTECO, so it's good to have it available directly.
Diffstat (limited to 'src/cmdline.h')
-rw-r--r--src/cmdline.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cmdline.h b/src/cmdline.h
index 6095cbb..a87e592 100644
--- a/src/cmdline.h
+++ b/src/cmdline.h
@@ -73,11 +73,13 @@ private:
inline void
rubout(void)
{
- undo.pop(--len);
- rubout_len++;
+ if (len) {
+ undo.pop(--len);
+ rubout_len++;
+ }
}
- void insert(const gchar *src);
+ void insert(const gchar *src = NULL);
inline void
insert(gchar key)
{