mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07: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:
parent
e9dd640897
commit
29712aef60
@ -1724,7 +1724,7 @@ BYPASS_AU:
|
||||
void block_autocmds(void)
|
||||
{
|
||||
// Remember the value of v:termresponse.
|
||||
if (is_autocmd_blocked()) {
|
||||
if (!is_autocmd_blocked()) {
|
||||
old_termresponse = get_vim_var_str(VV_TERMRESPONSE);
|
||||
}
|
||||
autocmd_blocked++;
|
||||
@ -1737,7 +1737,7 @@ void unblock_autocmds(void)
|
||||
// When v:termresponse was set while autocommands were blocked, trigger
|
||||
// the autocommands now. Esp. useful when executing a shell command
|
||||
// during startup (nvim -d).
|
||||
if (is_autocmd_blocked()
|
||||
if (!is_autocmd_blocked()
|
||||
&& get_vim_var_str(VV_TERMRESPONSE) != old_termresponse) {
|
||||
apply_autocmds(EVENT_TERMRESPONSE, NULL, NULL, false, curbuf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user