Open niksingh710 opened 1 month ago
I'm very excited that fzf has added this!
8637bc3
This is the issue i am facing.
The thumbnail size is slightly bigger than the size of fzf preview box. so fzf only renders bordered box and shows the image when the preview window is scrolled.
I guess reduction of the thumbnail dimensions would be a option to fix this
diff --git a/ytfzf b/ytfzf
index 3da39ac..066f56c 100755
--- a/ytfzf
+++ b/ytfzf
@@ -2983,7 +2983,7 @@ preview_display_image() {
chafa-sixel)
printf '\n'
command_exists "chafa" || die 3 "${new_line}chafa is not installed"
- chafa -f sixel -s "${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}" "$thumb_path" 2>> "$thumbnail_debug_log" ;;
+ chafa -f sixel -s "${FZF_PREVIEW_COLUMNS}x$(( FZF_PREVIEW_LINES - 7 ))" "$thumb_path" 2>> "$thumbnail_debug_log" ;;
catimg)
printf '\n'
command_exists "catimg" || die 3 "${new_line}catimg is not installed"
This patch fixes the issue.
Problem
Why do we need this feature? So that terminals having sixel support can easily show thumbnails.
Feature
Description of your proposed feature.
This is the command i use in my fzf preview script to handle
images
.