satellite.nvim icon indicating copy to clipboard operation
satellite.nvim copied to clipboard

error "unable to get a view"

Open justinmk opened this issue 8 months ago • 6 comments

Describe the bug

Sometimes satellite throws an error. This started happening in the last 1-2 weeks.

Seems to involve a gitsigns event, but I would expect satellite to never throw an error on window changes.

satellite.nvim: unable to get a view
stack traceback:
	...site/pack/core/opt/satellite.nvim/lua/satellite/view.lua:260: in function <...site/pack/core/opt/satellite.nvim/lua/satellite/view.lua:247>
	[C]: in function 'nvim_exec_autocmds'
	...site/pack/core/opt/gitsigns.nvim/lua/gitsigns/status.lua:15: in function 'autocmd_update'
	...site/pack/core/opt/gitsigns.nvim/lua/gitsigns/status.lua:49: in function 'clear'
	...site/pack/core/opt/gitsigns.nvim/lua/gitsigns/attach.lua:430: in function 'detach'
	...site/pack/core/opt/gitsigns.nvim/lua/gitsigns/attach.lua:74: in function <...site/pack/core/opt/gitsigns.nvim/lua/gitsigns/attach.lua:72>

To Reproduce

I don't have a full repro yet, the circumstances are very weird.

Partial steps:

  1. Open a diff with fugitive
  2. Close it with <c-w>q

WIP minimal.lua:

for name, url in pairs{
  satellite = 'https://github.com/lewis6991/satellite.nvim',
  gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
  fugitive = 'https://github.com/tpope/vim-fugitive',
} do
  local install_path = vim.fn.fnamemodify('satellite_issue/'..name, ':p')
  if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system { 'git', 'clone', '--depth=99', url, install_path }
  end
  vim.opt.runtimepath:append(install_path)
end

require('satellite').setup{}
require('gitsigns').setup{
  signs_staged_enable = false,
  current_line_blame = true,
  current_line_blame_opts = {
    virt_text_pos = 'eol_right_align',
  },
}

Expected behavior

No error.

justinmk avatar Aug 21 '25 04:08 justinmk

Might be related to https://github.com/neovim/neovim/issues/35453#issuecomment-3218027145

Edit: not fixed by https://github.com/neovim/neovim/pull/35474

justinmk avatar Aug 24 '25 15:08 justinmk

been having the same problem. I rarely see it on window change, but very frequently when deleting the current buffer

thesimonho avatar Sep 05 '25 07:09 thesimonho

@lewis6991 any chance we can get this fixed? The patch linked in https://github.com/QuiiBz/dotfiles/commit/5de82103aa5d9a4e462d778a2ecbe596d5f90cf4 seems to do the trick. @QuiiBz would you mind opening your patch as PR here?

anthraxx avatar Nov 16 '25 20:11 anthraxx

@lewis6991 any chance we can get this fixed? The patch linked in https://github.com/QuiiBz/dotfiles/commit/5de82103aa5d9a4e462d778a2ecbe596d5f90cf4 seems to do the trick. @QuiiBz would you mind opening your patch as PR here?

I reverted this changed and moved to another plugin as I was still encountering somewhat similar but different errors. This patch might help but didn't fix everything.

QuiiBz avatar Nov 17 '25 17:11 QuiiBz

@QuiiBz huh interesting, running with your patch for days now and never had any issues. Do you recall a reproducer for the remaining one? Thanks for checking-in and responding here, especially after you moved to another plugin, much appreciated 😻

anthraxx avatar Nov 18 '25 16:11 anthraxx

Do you recall a reproducer for the remaining one?

If I remember correctly, it was still erroring when closing or moving to different buffers, though less frequently than before that patch.

QuiiBz avatar Nov 19 '25 16:11 QuiiBz