stevearc / stickybuf.nvim

Neovim plugin for locking a buffer to a window
MIT License
246 stars 7 forks source link

fix BufUnload-related neogit commit issue #23

Closed emmanueltouzery closed 12 months ago

emmanueltouzery commented 12 months ago

turns out the neogit commit message mechanism relies on BufUnload. The outcome was that a neogit window appears where you can enter the commit message.. You enter the message, :wq, the commit is committed, the window closes then reopens immediately. The issue is fixed when asking stickybuf to ignore the NeogitCommitMessage file type.

In my commit I wrote it's related to neogit relying on BufUnload, although i'm not 100% sure of the exact sequence of events and cause of the issue.

stevearc commented 12 months ago

It's probably the same sequence as #1. I was told that this was no longer an issue in #20, but apparently that is not the case. Thanks for the fix!

Shatur commented 12 months ago

Strange, worked fine for me before.

emmanueltouzery commented 12 months ago

to be clear, the repro for me is... open a file in a git repo, with neogit and stickybuf installed.. make some changes, run :Neogit, press cc to open the commit window, type some text, press :wq to validate the changes. With that stickybuf setting, the window with the commit message would stay around, and now it correctly closes/disappears.