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

bug: (explorer) multiple errors when selecting a file from explorer and then closing explorer with '<space>e'

Open mtp13 opened this issue 1 year ago • 1 comments

Did you check docs and existing issues?

  • [x] I have read all the snacks.nvim docs
  • [x] I have updated the plugin to the latest version before submitting this issue
  • [x] I have searched the existing issues of snacks.nvim
  • [x] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.11.0-dev-1664+ge71d2c817d

Operating system/version

MacOS Sequoia 15.3

Describe the bug

I get the following error messages when closing explorer after selecting a file:

Error executing vim.schedule lua callback: ...re/nvim/lazy/snacks.nvim/lua/snacks/picker/core/list.lua:199: attempt to index field 'picker' (a nil value)
stack traceback:
	...re/nvim/lazy/snacks.nvim/lua/snacks/picker/core/list.lua:199: in function '_move'
	...re/nvim/lazy/snacks.nvim/lua/snacks/picker/core/list.lua:219: in function 'move'
	...re/nvim/lazy/snacks.nvim/lua/snacks/picker/core/list.lua:102: in function 'view'
	...m/lazy/snacks.nvim/lua/snacks/picker/source/explorer.lua:91: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>

Steps To Reproduce

  1. I start neovim.
  2. Type 'e' to open the snacks.explorer.
  3. Search for any file such as index.html.
  4. Select the file, index.html.
  5. Then type 'e' to close explorer.

Expected Behavior

Shouldn't get the error messages.

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "folke/snacks.nvim", opts = {} },
    -- add any other plugins here
  },
})

mtp13 avatar Jan 31 '25 19:01 mtp13

Clarification: when I describe the keystrokes, I should have said I type 'leader e'.

mtp13 avatar Jan 31 '25 19:01 mtp13