mirror of
https://github.com/jarun/nnn.git
synced 2024-11-04 18:33:12 +00:00
Proper fix for preview-tui zombie-pane
This commit is contained in:
parent
48415c5e1c
commit
26f380f154
|
@ -401,13 +401,6 @@ ueberzug_remove() {
|
||||||
}
|
}
|
||||||
|
|
||||||
winch_handler() {
|
winch_handler() {
|
||||||
# workaround for preview-tui tmux child causing zombie pane
|
|
||||||
if [ "$NNN_PARENT" -eq "$NNN_PARENT" ] 2>/dev/null; then
|
|
||||||
kill -0 "$NNN_PARENT" || return
|
|
||||||
else
|
|
||||||
pidof nnn || return
|
|
||||||
fi
|
|
||||||
|
|
||||||
clear
|
clear
|
||||||
kill "$(cat "$PREVIEWPID")"
|
kill "$(cat "$PREVIEWPID")"
|
||||||
if [ -p "$FIFO_UEBERZUG" ]; then
|
if [ -p "$FIFO_UEBERZUG" ]; then
|
||||||
|
@ -427,6 +420,7 @@ preview_fifo() {
|
||||||
printf "%s" "$selection" > "$CURSEL"
|
printf "%s" "$selection" > "$CURSEL"
|
||||||
fi
|
fi
|
||||||
done < "$NNN_FIFO"
|
done < "$NNN_FIFO"
|
||||||
|
sleep 0.1 # make sure potential preview by winch_handler is killed
|
||||||
pkill -P "$$"
|
pkill -P "$$"
|
||||||
} 2>/dev/null
|
} 2>/dev/null
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue