gokcehan / lf

Terminal file manager
MIT License
7.62k stars 324 forks source link

Resizing terminal font doesn't adjust the size and position of preview image #1793

Open jdujava opened 2 weeks ago

jdujava commented 2 weeks ago

I use image previews in lf via ueberzugpp. After resizing the terminal font, the image preview is not located at proper position. Exiting lf and starting new instance (in the terminal with resized font) fixes the sizing and positioning of the preview.

Perhaps lf setups some variables depending on the font size (which concern preview size/positioning) only at the start?

joelim-work commented 2 weeks ago

Have you tried logging the parameters to the previewer script (e.g. x, y, width, height) whenever it runs? These values are measured in cells, so they should change whenever the terminal resizes.

jdujava commented 2 weeks ago

You are right, the values (x, y, width, height) are indeed changing on the font resizing. It seems, that ueberzug/ueberzugpp just has trouble adapting to the new font size.