aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index c8ac27b..a04d1d1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -506,7 +506,8 @@ main(int argc, char **argv)
goto cleanup;
g_clear_error(&error);
- if (teco_quit_requested) {
+ if (teco_ed & TECO_ED_EXIT) {
+ /* exit was requested using the EX command */
if (!teco_expressions_pop_num_calc(&ret, EXIT_SUCCESS, &error) ||
!teco_ed_hook(TECO_ED_HOOK_QUIT, &error))
goto cleanup;