summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hooks.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hooks.c b/src/hooks.c
index 5fffb70..a2bc8b2 100644
--- a/src/hooks.c
+++ b/src/hooks.c
@@ -51,13 +51,17 @@ int run_hook(const char *name)
if (!io_file_exists(hook_path))
return 0;
- wins_prepare_external();
+ if (ui_mode == UI_CURSES)
+ wins_prepare_external();
+
if ((pid = shell_exec(NULL, NULL, *arg, arg))) {
ret = child_wait(NULL, NULL, pid);
if (ret)
press_any_key();
}
- wins_unprepare_external();
+
+ if (ui_mode == UI_CURSES)
+ wins_unprepare_external();
return ret;
}