image.nvim icon indicating copy to clipboard operation
image.nvim copied to clipboard

Sometimes image is not centered when `vim.o.winborder` is set

Open Steinhagen opened this issue 4 months ago • 4 comments

Sometimes, the rendered image is not centered when vim.o.winborder is set.

https://github.com/user-attachments/assets/e6d926b9-b66b-431c-834b-bfa372e7b7f8

The complete configuration is can be found at: https://github.com/Steinhagen/neovim-config

Setup:

  1. Ghostty
  2. Latest Neovim version: v0.12.0-nightly+7afcfb6
  3. tmux with image support enabled
  4. winborder set: vim.o.winborder = 'rounded' -- Add border to all floating windows
  5. image.nvim plugin configured as: https://github.com/Steinhagen/neovim-config/blob/1d682ff8c7de66ec8329dca0a9c4f390b4377ca5/lua/plugins/image.lua

Steinhagen avatar Aug 16 '25 14:08 Steinhagen

hmm can't reproduce on NVIM v0.12.0-nightly+5f8d4a2 + Kitty, wondering if it's ghostty related

3rd avatar Aug 18 '25 12:08 3rd

Gave this a try using kitty v. 0.42.2 and the issue is still reproducing. I'm not exactly sure what else could be. On a maybe related side note, I'm using Plasma using the Wayland shell on a NVIDIA proprietary driver. I wonder is someone else is able to test this and see if they can reproduce it.

Steinhagen avatar Aug 18 '25 15:08 Steinhagen

does it still produce these weird artifacts?

Image

3rd avatar Aug 18 '25 15:08 3rd

I've seen those only very rarely and no, can't say I've seen them with Kitty while I tested this. Most of the time, I see the behavior from second 0:12 in the video there the image is not centered inside the border box.

Steinhagen avatar Aug 18 '25 15:08 Steinhagen