aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmdline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline.cpp')
-rw-r--r--cmdline.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmdline.cpp b/cmdline.cpp
index b9c58a0..152adc5 100644
--- a/cmdline.cpp
+++ b/cmdline.cpp
@@ -1,4 +1,5 @@
#include <string.h>
+#include <stdlib.h>
#include <glib.h>
#include <glib/gprintf.h>
@@ -13,6 +14,8 @@ static gchar *macro_echo(const gchar *macro, const gchar *prefix = "");
gchar *cmdline = NULL;
+bool quit_requested = false;
+
void
cmdline_keypress(gchar key)
{
@@ -73,7 +76,10 @@ process_edit_cmd(gchar key)
case '\x1B':
if (cmdline && cmdline[cmdline_len - 1] == '\x1B') {
- /* TODO: exit if previously requested */
+ if (quit_requested) {
+ /* FIXME */
+ exit(EXIT_SUCCESS);
+ }
undo.clear();
goto_table_clear();