Skip to content

Image Misalignment in Neovim Splits #307

@Chayanon-Ninyawee

Description

@Chayanon-Ninyawee

When using Neovim's :split or :vsplit, images rendered appear misaligned or outside the visible window until the pane is manually resized (e.g., by dragging or using +/>). After resizing, the image snaps into the correct position.

Image

Environment:
OS: Linux Mint 22.1 Xia base: Ubuntu 24.04 noble
Terminal: Ghostty
Backend: kitty
tmux version: tmux 3.5a
Neovim version: NVIM v0.11.2

I fixed this by using this workaround:

vim.api.nvim_create_autocmd({ "CursorMoved", "WinEnter", "BufEnter" }, {
    callback = function()
        vim.defer_fn(function()
            vim.cmd("redraw!")
        end, 50)
    end,
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions