projects
/
nnn.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5662170
)
preview-tabbed will now exit with ^C (#734)
author
cdarkly <70930787+cdarkly@users.noreply.github.com>
Sat, 19 Sep 2020 16:55:53 +0000 (12:55 -0400)
committer
GitHub <noreply@github.com>
Sat, 19 Sep 2020 16:55:53 +0000 (22:25 +0530)
* preview-tabbed will not exit with ^C
* preview-tabbed will not exit with ^C
plugins/preview-tabbed
patch
|
blob
|
history
diff --git
a/plugins/preview-tabbed
b/plugins/preview-tabbed
index 6a55058b7d6afd33e76072531e50c7c4ab059c98..98a4be89b1145403d1fe405298cfa1229be50de9 100755
(executable)
--- 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"