]> Sergey Matveev's repositories - nnn.git/commitdiff
Preview-tui fix winch_handler
authorLuuk van Baal <luukvbaal@gmail.com>
Tue, 18 May 2021 09:20:56 +0000 (11:20 +0200)
committerArun Prakash Jana <engineerarun@gmail.com>
Tue, 18 May 2021 23:18:03 +0000 (04:48 +0530)
plugins/preview-tui
plugins/preview-tui-ext

index a3265a7bb6ed25a07e2e00912a083f4b3ec128c2..6c7abc53728f429a5ff3ad85007a4cea27aabeb3 100755 (executable)
@@ -274,8 +274,10 @@ ueberzug_remove() {
 winch_handler() {
     clear
     kill "$(cat "$IMGPID")" "$(cat "$PAGERPID")"
-    pkill -P "$$"
-    if [ -p "$FIFO_UEBERZUG" ]; then tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json & fi
+    if [ -p "$FIFO_UEBERZUG" ]; then
+        pkill -P "$$"
+        tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json &
+    fi
     cat "$CURSEL" > "$NNN_FIFO"
     preview_file "$(cat "$CURSEL")"
     preview_fifo &
index a1a0a69201697b2ce7e0d1f39483f1d2a3e5886f..b705e1129c772c5866075e1f01226b840d46ac67 100755 (executable)
@@ -373,8 +373,10 @@ ueberzug_remove() {
 winch_handler() {
     clear
     kill "$(cat "$IMGPID")" "$(cat "$PAGERPID")"
-    pkill -P "$$"
-    if [ -p "$FIFO_UEBERZUG" ]; then tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json & fi
+    if [ -p "$FIFO_UEBERZUG" ]; then
+        pkill -P "$$"
+        tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json &
+    fi
     cat "$CURSEL" > "$NNN_FIFO"
     preview_file "$(cat "$CURSEL")"
     preview_fifo &