rhysd / git-messenger.vim

Vim and Neovim plugin to reveal the commit messages under the cursor
MIT License
1.34k stars 32 forks source link

fix ignore BufEnter and BufLeave events when create popup window #83

Open Alex-duzhichao opened 2 years ago

Alex-duzhichao commented 2 years ago

After popup window has been created, git-messenager uses noautocmd wincmd p to jump back to the current buffer, which ignores BufEnter and BufLeave events. Some other plugins depends on event BufEnter/BufLeave to take effect normally. So git-messenager should use wincmd p to preserve events.

See issue #65 for details.

rhysd commented 2 years ago

Did you confirm that this causes no issue? I concern that the following auto commands are unexpectedly triggered by this change.

https://github.com/rhysd/git-messenger.vim/blob/2e67899355f3f631aad6845925e4c2c13546444d/autoload/gitmessenger/popup.vim#L211

https://github.com/rhysd/git-messenger.vim/blob/2e67899355f3f631aad6845925e4c2c13546444d/autoload/gitmessenger.vim#L70

https://github.com/rhysd/git-messenger.vim/blob/2e67899355f3f631aad6845925e4c2c13546444d/autoload/gitmessenger.vim#L65