lf
lf copied to clipboard
Ueberzug image previews overflow if drawbox option is set
When using ueberzug image previews as described in the wiki, the drawbox option isn't taken into account and some previews overflow into the border. I would post a screenshot but for some reason import doesn't work when trying to capture lf, I just get a black blob.
I've had that problem in the past but it seems to have been resolved at some point. I've compiled lf from source ca. a week ago and it has been working ever since.

What doesn't work is that when toggling borders the preview is not generated anew, causing ueberzug
previews to be off.

@slavistan You seem right. I thought we explicitly need to handle this while exporting coordinate variables but there is no need for that since window coordinates already take drawbox option into account.
I have now pushed a fix to flush the cache and renew the preview with drawbox option changes. I don't think there is anything else left for this issue.
Hello @gokcehan ,
This issue persists when I preview images using the icat of kitty terminal. The config I followed is in Wiki
My lf version is the latest (i.e., built from source).
Thank you.
Update: if subtract 1 from the width, the image size will be correct.
#!/usr/bin/env bash
file=$1
w=`expr $2 - 1`
h=$3
x=$4
y=$5
case "$file" in
*.bmp|*.jpg|*.jpeg|*.png|*.xpm) kitty +icat --silent --transfer-mode file --place "${w}x${h}@${x}x${y}" "$file" && exit 1;;
esac
I'm having this issue as well, most noticeably on Konsole and Tilix (tilix has images outside the terminal entirely). However for me, at least in Konsole, it happens regardless of drawboxes being present or not. I am using ueberzug previews.

