gennaro-tedesco / nvim-possession

📌 the no-nonsense session manager
MIT License
236 stars 7 forks source link

Error filtering sessions #44

Closed SlartThunder closed 1 month ago

SlartThunder commented 1 month ago

When displaying the list of sessions, if I type something that does not exist, this error pops up:

Error executing vim.schedule lua callback: .../nvim/lazy/nvim-possession/lua/nvim-possession/utils.lua:10: Is a directory
stack traceback:
        [C]: in function '(for generator)'
        .../nvim/lazy/nvim-possession/lua/nvim-possession/utils.lua:10: in function 'session_files'
        ...are/nvim/lazy/nvim-possession/lua/nvim-possession/ui.lua:20: in function 'populate_preview_buf'
        ...hare/nvim/lazy/fzf-lua/lua/fzf-lua/previewer/builtin.lua:263: in function 'populate_preview_buf'
        ...hare/nvim/lazy/fzf-lua/lua/fzf-lua/previewer/builtin.lua:280: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
gennaro-tedesco commented 1 month ago

Thank you for reporting, yes, I see it and can reproduce it. Presumably I must return a different value to the builtin previewer when no matches are found.

gennaro-tedesco commented 1 month ago

I have pushed a fix in https://github.com/gennaro-tedesco/nvim-possession/pull/45: could you test if it works? You can install the branch dir_check to do so:

  "gennaro-tedesco/nvim-possession",
  branch = "dir_check",
  ...
gennaro-tedesco commented 1 month ago

The issue has been fixed, please update the plugin to the latest version.

SlartThunder commented 1 month ago

Thank you @gennaro-tedesco ! It works very well now!