Skip to content

Error when deleting a buffer before blame_line loads #946

@MariaSolOs

Description

@MariaSolOs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions