nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f8f6d6a482c4835326df6ae5c1719e19c035f7e0
parent 7f63bef4d6c9f70b99a4c98435c9c0a68e05be44
Author: Luuk van Baal <luukvbaal@gmail.com>
Date:   Tue, 10 Oct 2023 02:50:27 +0200

Preview-tui avoid early exit after SIGWINCH

Diffstat:
Mplugins/preview-tui | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/plugins/preview-tui b/plugins/preview-tui @@ -475,12 +475,14 @@ if [ "$PREVIEW_MODE" -eq 1 ] 2>/dev/null; then fi preview_file "$PWD/$1" - preview_fifo & + preview_fifo & WAITPID=$! printf "%s" "$!" > "$FIFOPID" printf "%s" "$PWD/$1" > "$CURSEL" - trap 'winch_handler; wait' WINCH + trap 'winch_handler' WINCH trap 'rm "$PREVIEWPID" "$CURSEL" "$FIFO_UEBERZUG" "$FIFOPID" "$POSOFFSET" 2>/dev/null' INT HUP EXIT - wait "$!" 2>/dev/null + while kill -s 0 $WAITPID; do + wait $WAITPID 2>/dev/null + done exit 0 else if [ ! -r "$NNN_FIFO" ]; then