mirror of
https://github.com/jarun/nnn.git
synced 2024-11-18 17:09:14 +00:00
Change preview-tui winch workaround
This commit is contained in:
parent
fa7c19c409
commit
c48691fe3d
|
@ -378,6 +378,13 @@ 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
|
||||||
|
@ -385,9 +392,6 @@ winch_handler() {
|
||||||
tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json &
|
tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json &
|
||||||
fi
|
fi
|
||||||
preview_file "$(cat "$CURSEL")"
|
preview_file "$(cat "$CURSEL")"
|
||||||
if ! kill -0 "$NNN_PARENT" || ! pgrep nnn >/dev/null; then
|
|
||||||
pkill -P "$$"
|
|
||||||
fi
|
|
||||||
} 2>/dev/null
|
} 2>/dev/null
|
||||||
|
|
||||||
preview_fifo() {
|
preview_fifo() {
|
||||||
|
|
Loading…
Reference in a new issue