Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git current line blame overlap with text when split windows #966

Closed
ray-x opened this issue Apr 2, 2024 · 1 comment · Fixed by #1002
Closed

Git current line blame overlap with text when split windows #966

ray-x opened this issue Apr 2, 2024 · 1 comment · Fixed by #1002
Labels
bug Something isn't working

Comments

@ray-x
Copy link

ray-x commented Apr 2, 2024

Description

It is similar to #870
But the issue I saw is when I have split windows and virt_text_pos is right_align
See the recorded video on how to reproduce.

Neovim version

NVIM v0.10.0-dev-2698+g00e71d3da

Operating system and version

Mac

Expected behavior

When resize the split, the current line blame should not overlap text

Actual behavior

When resizing nvim screen split, the blame will overlap text

gitsigns.mp4

Minimal config

for name, url in pairs{
  gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
  -- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE
} do
  local install_path = vim.fn.fnamemodify('gitsigns_issue/'..name, ':p')
  if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
  end
  vim.opt.runtimepath:append(install_path)
end

require('gitsigns').setup{
  debug_mode = true, -- You must add this to enable debug messages
  current_line_blame = true, 
  current_line_blame_opts = {
    virt_text = true,
    virt_text_pos = 'right_align', -- 'eol' | 'overlay' | 'right_align'
    delay = 1000,
    ignore_whitespace = false,
    virt_text_priority = 100,
  },
  -- ADD GITSIGNS CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
}

-- ADD INIT.LUA SETTINGS THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE

Steps to reproduce

  1. nvim --clean -u minimal.lua
  2. split screen with vp
  3. resize the screen size
  4. see issue

Please refer to the screen shot

Gitsigns debug messages

No response

@ray-x ray-x added the bug Something isn't working label Apr 2, 2024
@lewis6991
Copy link
Owner

I've partially fixed this by adding WinResized to the main autocmd.

The issue still exists if the same buffer is in both splits. This can't be fixed until 0.10 is released with scoped extmarks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment