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

Sometimes hunks not gets reload immediately on start #614

Closed
UnkwUsr opened this issue Aug 26, 2022 · 2 comments · Fixed by #619
Closed

Sometimes hunks not gets reload immediately on start #614

UnkwUsr opened this issue Aug 26, 2022 · 2 comments · Fixed by #619
Labels
bug Something isn't working

Comments

@UnkwUsr
Copy link

UnkwUsr commented Aug 26, 2022

Description

This bug is very similar to #558, but this time no need in other plugins.
... and test file is a little bit different. Strange thing: test file from linked issue works normally (meaning have no bug), but to reproduce THIS issue I just cut few lines from the previous one.

Hope it will be reproducible (tested in docker).
test_repo_v2.tar.gz

Neovim version

NVIM v0.7.2

Operating system and version

archlinux

Expected behavior

No response

Actual behavior

See #558

Minimal config

vim.o.packpath = '/tmp/nvim/site'

local plugins = {
  gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
  -- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE
}

for name, url in pairs(plugins) do
  local install_path = '/tmp/nvim/site/pack/test/start/'..name
  if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
  end
end

require('gitsigns').setup{
  debug_mode = true, -- You must add this to enable debug messages
  -- ADD GITSIGNS CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE

  on_attach = function(bufnr)
    vim.api.nvim_buf_set_keymap(bufnr, 'n', ']c',  "&diff ? ']c' : '<cmd>Gitsigns next_hunk<CR>'", {expr=true})
  end
}

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

Steps to reproduce

  1. nvim --clean -u minimal.lua asdf.c
  2. Press ]c
  3. See your cursor on hunk, but it is not highlighted
  4. Press j
  5. See hunks get highlighting

Gitsigns debug messages

No response

@UnkwUsr UnkwUsr added the bug Something isn't working label Aug 26, 2022
lewis6991 added a commit that referenced this issue Sep 1, 2022
@lewis6991
Copy link
Owner

Thanks, was able to reproduce.

Are you able to test #619?

@UnkwUsr
Copy link
Author

UnkwUsr commented Sep 1, 2022

Yeah, it works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants