mirror of
https://github.com/neovim/neovim
synced 2025-07-17 01:31:48 +00:00
fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds #15372
Logic got swapped in 7574918dc7
.
We didn't notice it since v:termresponse isn't really used yet. #6279
This commit is contained in:
@ -1724,7 +1724,7 @@ BYPASS_AU:
|
|||||||
void block_autocmds(void)
|
void block_autocmds(void)
|
||||||
{
|
{
|
||||||
// Remember the value of v:termresponse.
|
// Remember the value of v:termresponse.
|
||||||
if (is_autocmd_blocked()) {
|
if (!is_autocmd_blocked()) {
|
||||||
old_termresponse = get_vim_var_str(VV_TERMRESPONSE);
|
old_termresponse = get_vim_var_str(VV_TERMRESPONSE);
|
||||||
}
|
}
|
||||||
autocmd_blocked++;
|
autocmd_blocked++;
|
||||||
@ -1737,7 +1737,7 @@ void unblock_autocmds(void)
|
|||||||
// When v:termresponse was set while autocommands were blocked, trigger
|
// When v:termresponse was set while autocommands were blocked, trigger
|
||||||
// the autocommands now. Esp. useful when executing a shell command
|
// the autocommands now. Esp. useful when executing a shell command
|
||||||
// during startup (nvim -d).
|
// during startup (nvim -d).
|
||||||
if (is_autocmd_blocked()
|
if (!is_autocmd_blocked()
|
||||||
&& get_vim_var_str(VV_TERMRESPONSE) != old_termresponse) {
|
&& get_vim_var_str(VV_TERMRESPONSE) != old_termresponse) {
|
||||||
apply_autocmds(EVENT_TERMRESPONSE, NULL, NULL, false, curbuf);
|
apply_autocmds(EVENT_TERMRESPONSE, NULL, NULL, false, curbuf);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user