Open xaljer opened 4 years ago
Would you describe followings? I could not understand what happened only from the description.
BufEnter
configuration in your .vimrc
Does git-messenger depends on this autocmd?
Yes.
Actual sequence of this plugin is as follows:
:GitMessenger
commandgit blame
BufEnter
autocmd to detect when the cursor moving outside the popup windowBTW, 'verbose' option would be useful to debug such a problem. Please see :help 'verbose'
.
$ nvim -V8
I believe lewis6991/gitsigns.nvim#484 is an example of this issue.
I think this problem is caused by using noautocmd
in autoload/gitmessenger/popup.vim, it ignores all events.
Lots of plugins depend on Buf*
events, so I think it's better to not ignore events.
@rhysd hi, do you have any solution to fix this problem? Thanks.
https://user-images.githubusercontent.com/9667107/159734777-36e1b067-dd32-4743-bad2-09ae7c9c25d9.mp4
I use git-messenger with APZelos/blamer.nvim. After calling GitMessenger
, blamer.nvim stop showing blame infomations. It's because blamer.nvim uses BufEnter/BufLeave events to decide whether to show blame info, but git-messenger use noautocmd wincmd p
to switch between current buffer and popup window, which ignores BufEnter/BufLeave events.
If I replace noautocmd wincmd p
to wincmd p
, this problem is fixed.
@rhysd Hi buddy, do you think this fix is correct ? Thanks.
I've had this issue crop-up again recently
Hi, @rhysd : I am debugging a vim plugin using
BufEnter
autocmd on nvim. I found that when I call:GitMessenger
, aBufEnter
autocmd is triggered. ButBufEnter
won't be triggered again when float window disappear (git_messenger_close_on_cursor_moved is true). My plugin dependsBufEnter
to do some detect. When it enter to git-messenger buffer, function is closed, and there is no condition to make me open function again when back to normal buffer. I am not familiar with vimscript, so could you help to answer my question?BufEnter
on popup window show orBufEnter
again when popup window close? (Because I think it may be a more compatible behavior to have pairing autocmd.) This may not an issue of git messenger, but thanks any way~