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 while :GitSigns blame #1073

Closed
konart opened this issue Jun 27, 2024 · 1 comment · Fixed by #1080
Closed

Error while :GitSigns blame #1073

konart opened this issue Jun 27, 2024 · 1 comment · Fixed by #1080
Labels
bug Something isn't working

Comments

@konart
Copy link

konart commented Jun 27, 2024

Description

A wild error appeared after one of recent commits:

Error executing vim.schedule lua callback: ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/async.lua:85: The coroutine failed with this message: ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/blame.lua:118: Invalid 'col': out of range
stack traceback:
        [C]: in function 'nvim_buf_set_extmark'
        ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/blame.lua:118: in function 'render'
        ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/blame.lua:273: in function <...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/blame.lua:250>
stack traceback:
        [C]: in function 'error'
        ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/async.lua:85: in function 'cb'
        ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/async.lua:127: in function <...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/async.lua:126>

Neovim version

0.10

Operating system and version

macOS 14.5

Expected behavior

No response

Actual behavior

Error while using Error while :GitSigns blame

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. mkdir gitsigns_issue
  2. cd gitsigns_issue
  3. git init
  4. touch file
  5. git add file
  6. git commit -m 'initial commit'
  7. nvim --clean -u minimal.lua file
  8. nvim file
  9. :Gitsigns blame

Gitsigns debug messages

No response

Gitsigns cache

No response

@konart konart added the bug Something isn't working label Jun 27, 2024
@lewis6991
Copy link
Owner

Repro steps do not work.

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
Development

Successfully merging a pull request may close this issue.

2 participants