mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 21:18:34 +00:00
vim-patch:9.0.0788: ModeChanged autocmd not executed when Visual ends with CTRL-C (#20722)
Problem: ModeChanged autocmd not executed when Visual mode is ended with
CTRL-C.
Solution: Do not trigger the autocmd when got_int is set. (closes vim/vim#11394)
61c4b04799
Cherry-pick removal of cmdwin feature check from patch 9.0.0663.
This commit is contained in:
@@ -229,7 +229,9 @@ void get_mode(char *buf)
|
||||
/// Fires a ModeChanged autocmd if appropriate.
|
||||
void may_trigger_modechanged(void)
|
||||
{
|
||||
if (!has_event(EVENT_MODECHANGED)) {
|
||||
// Skip this when got_int is set, the autocommand will not be executed.
|
||||
// Better trigger it next time.
|
||||
if (!has_event(EVENT_MODECHANGED) || got_int) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user