diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-11 19:15:02 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-11 19:15:02 +0100 |
commit | cd132baf66da7ede169a9718e7473fa7bbb472ba (patch) | |
tree | e54ab2d6f3a28a113aab808ca0a6a241deb2f0c2 | |
parent | 16f989bd0dcf1e6ff538edad92d203b0860b62ad (diff) | |
download | sciteco-cd132baf66da7ede169a9718e7473fa7bbb472ba.tar.gz |
properly support <CTL/Z> suspension as immediate command
see comment: special handling of <CTL/Z> in terminal might
be disabled, or commandline input might be in X11 window...
-rw-r--r-- | src/cmdline.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cmdline.cpp b/src/cmdline.cpp index aabf9e5..b28bfa1 100644 --- a/src/cmdline.cpp +++ b/src/cmdline.cpp @@ -21,6 +21,7 @@ #include <string.h> #include <stdlib.h> +#include <signal.h> #include <glib.h> #include <glib/gprintf.h> @@ -251,6 +252,17 @@ process_edit_cmd(gchar key) macro_pc = 0; } break; + + case CTL_KEY('Z'): + /* + * <CTL/Z> does not raise signal if handling of + * special characters temporarily disabled in terminal + * (Curses), or command-line is detached from + * terminal (GTK+) + */ + raise(SIGTSTP); + *insert = '\0'; + break; } return insert; |