summaryrefslogtreecommitdiff
path: root/bin/fzf-preview.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/fzf-preview.sh')
-rwxr-xr-xbin/fzf-preview.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/fzf-preview.sh b/bin/fzf-preview.sh
index ebf5b0d8..5f996973 100755
--- a/bin/fzf-preview.sh
+++ b/bin/fzf-preview.sh
@@ -49,9 +49,9 @@ if [[ ! $type =~ image/ ]]; then
fi
dim=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}
-if [[ $dim = x ]]; then
+if [[ $dim == x ]]; then
dim=$(stty size < /dev/tty | awk '{print $2 "x" $1}')
-elif ! [[ $KITTY_WINDOW_ID ]] && (( FZF_PREVIEW_TOP + FZF_PREVIEW_LINES == $(stty size < /dev/tty | awk '{print $1}') )); then
+elif ! [[ $KITTY_WINDOW_ID ]] && ((FZF_PREVIEW_TOP + FZF_PREVIEW_LINES == $(stty size < /dev/tty | awk '{print $1}'))); then
# Avoid scrolling issue when the Sixel image touches the bottom of the screen
# * https://github.com/junegunn/fzf/issues/2544
dim=${FZF_PREVIEW_COLUMNS}x$((FZF_PREVIEW_LINES - 1))