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
459 stars 12 forks source link

neovim exits when current buffer is killed #368

Open bloznelis opened 3 weeks ago

bloznelis commented 3 weeks ago

Firstly, thank you for this plugin, I've been using it a lot!

Description

If you have no-neck-pain enabled, and you kill an active buffer (e.g. using :bd) it exits neovim completely.

Steps to reproduce

  1. Load at least two buffers
  2. :NoNeckPain
  3. :bd
  4. neovim exits

Expected behavior

I would expect for it to show the other loaded buffer instead of exiting (like it does when no-neck-pain is not used).

Environment

shortcuts commented 3 weeks ago

Hey, thanks for using the plugin, glad you like it :)

You should not see the issue anymore after setting fallbackOnBufferDelete = true, this will be defaulted to true in the next major version

bloznelis commented 2 weeks ago

Sorry for a late response,

I tried setting fallbackOnBufferDelete = true. Now it does not exit neovim, but opens a new empty buffer instead of any other loaded buffers. Maybe there is a setting to disable this too?

lorentzforces commented 3 days ago

Is this potentially related to #370 ?