Replace restorepreview workaround

This commit is contained in:
Luuk van Baal 2021-12-14 17:16:56 +01:00 committed by Arun Prakash Jana
parent 3be2dd8390
commit 06bf4f5dce
No known key found for this signature in database
GPG Key ID: A75979F35C080412
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,8 @@
# Description: Adds preview pipe to enable closing and re-opening
# the preview pane when running an undetached editor.
# Description: Adds preview pipe to enable closing and re-opening the preview
# pane when running an undetached editor. If you are using vim
# you might experience incorrectly resized window. Consider adding
# the following to your vimrc:
# autocmd VimEnter * :silent exec "!kill -s WINCH $PPID"
#
# Authors: Luuk van Baal

View File

@ -415,7 +415,7 @@ preview_fifo() {
if [ -n "$selection" ]; then
kill "$(cat "$PREVIEWPID")"
[ -p "$FIFO_UEBERZUG" ] && ueberzug_remove
[ "$selection" = "close" ] && sleep 0.15 && pkill -P "$$" && exit
[ "$selection" = "close" ] && break
preview_file "$selection"
printf "%s" "$selection" > "$CURSEL"
fi