shortcuts / no-neck-pain.nvim

☕ Dead simple yet super extensible plugin to center the currently focused buffer to the middle of the screen.
MIT License
552 stars 13 forks source link

When using incline.nvim, an error always occurs when I close Neovim #352

Closed tadashi-aikawa closed 4 months ago

tadashi-aikawa commented 4 months ago

Description

Thank you for the great plugin!

After upgrading to version 1.12.2, I consistently encounter an error when exiting Neovim.

This problem is likely related to the following issue.

https://github.com/shortcuts/no-neck-pain.nvim/issues/348

Steps to reproduce

  1. Install https://github.com/b0o/incline.nvim
  2. nvim
  3. :q
  4. Error
Error executing vim.schedule lua callback: ...re/nvim/lazy/no-neck-pain.nvim/lua/no-neck-pain/wins.lua:53: Vim:E444: Cannot close last window
stack traceback:
    [C]: in function 'nvim_win_close'
    ...re/nvim/lazy/no-neck-pain.nvim/lua/no-neck-pain/wins.lua:53: in function 'close'
    ...re/nvim/lazy/no-neck-pain.nvim/lua/no-neck-pain/main.lua:449: in function <...re/nvim/lazy/no-neck-pain.nvim/lua/no-neck-pain/main.lua:425>

Expected behavior

Close Nvim without errors.

Environment

shortcuts commented 4 months ago

Hey there, thanks a lot for using the plugin and reporting the issue! I'm working on a fix right now, sorry for the issue

shortcuts commented 4 months ago

Hey, this should now be fixed in 1.22.3, feel free to let me know how it went!

tadashi-aikawa commented 4 months ago

@shortcuts Thank you for your prompt response! I have confirmed that the issue has been fixed👍