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

Error when deleting a buffer before blame_line loads #946

Closed
MariaSolOs opened this issue Feb 19, 2024 · 0 comments · Fixed by #961 or #1002
Closed

Error when deleting a buffer before blame_line loads #946

MariaSolOs opened this issue Feb 19, 2024 · 0 comments · Fixed by #961 or #1002
Labels
bug Something isn't working

Comments

@MariaSolOs
Copy link

Description

When running Gitsigns blame_line on a huge file with tons of git history, a window saying Loading... will pop up. If one gives up and closes the buffer with bdelete, then seconds/minutes later an error will appear.

Neovim version

v0.10.0-dev-2384+g848fc8ede

Operating system and version

macOS Sonoma 14.3.1

Expected behavior

For the blame request to be cancelled when closing the buffer, or handling the case where the buffer isn't currently open by the time of completion.

Actual behavior

image

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
  -- 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. ...

Gitsigns debug messages

No response

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