aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xplugins/preview-tabbed7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/preview-tabbed b/plugins/preview-tabbed
index 6a55058..98a4be8 100755
--- a/plugins/preview-tabbed
+++ b/plugins/preview-tabbed
@@ -100,6 +100,12 @@ kill_viewer () {
fi
}
+sigint_kill () {
+ kill_viewer
+ kill "$TABBEDPID"
+ exit 0
+}
+
previewer_loop () {
unset -v NNN_FIFO
# mute from now
@@ -108,6 +114,7 @@ previewer_loop () {
MAINWINDOW="$(xdotool getactivewindow)"
start_tabbed
+ trap sigint_kill SIGINT
xdotool windowactivate "$MAINWINDOW"