nnn

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

commit 2c82c77a05001a8837f7a8a5df0f24c5548745a3
parent a447c12866f645dc9c6c7dc0137e63b52a974640
Author: Terminator X <engineerarun@gmail.com>
Date:   Thu, 23 Sep 2021 13:12:15 +0530

Merge pull request #1174 from luukvbaal/restorepreview

Improve restorepreview race conditions
Diffstat:
Mplugins/preview-tui | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/preview-tui b/plugins/preview-tui @@ -146,15 +146,15 @@ toggle_preview() { QLPATH="Bridge.exe" fi if kill "$(cat "$FIFOPID")"; then + printf "0" > "$NNN_PPIPE" kill "$(cat "$PREVIEWPID")" pkill -f "tail --follow $FIFO_UEBERZUG" if [ -n "$QLPATH" ] && stat "$1"; then f="$(wslpath -w "$1")" && "$QLPATH" "$f" & fi - printf "0" > "$NNN_PPIPE" else - start_preview "$1" "$QLPATH" printf "1" > "$NNN_PPIPE" + start_preview "$1" "$QLPATH" fi } >/dev/null 2>&1 @@ -391,7 +391,7 @@ preview_fifo() { if [ -n "$selection" ]; then kill "$(cat "$PREVIEWPID")" [ -p "$FIFO_UEBERZUG" ] && ueberzug_remove - [ "$selection" = "close" ] && sleep 0.1 && break + [ "$selection" = "close" ] && sleep 0.15 && break preview_file "$selection" printf "%s" "$selection" > "$CURSEL" fi