Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Alex-duzhichao
Copy link

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.

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 rhysd#65 for details.
@rhysd
Copy link
Owner

rhysd commented Mar 26, 2022

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

execute 'autocmd BufWipeout,BufLeave <buffer> call getbufvar(' . popup_bufnr . ', "__gitmessenger_popup").close()'

execute 'autocmd BufEnter,WinEnter * call <SID>on_buf_enter(' . opener_bufnr . ')'

autocmd CursorMoved,CursorMovedI,InsertEnter <buffer> call <SID>on_cursor_moved()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants