aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgmntroll <37435952+gmntroll@users.noreply.github.com>2021-08-16 12:43:21 +0500
committerGitHub <noreply@github.com>2021-08-16 00:43:21 -0700
commit29712aef602b96d70c1cabbc7c717be1d045c4ca (patch)
treee277d95a25e6b6ade29f8912a8a240f19532d28b /src
parente9dd640897e6a318d770be62bbcc9f417f95990e (diff)
downloadrneovim-29712aef602b96d70c1cabbc7c717be1d045c4ca.tar.gz
rneovim-29712aef602b96d70c1cabbc7c717be1d045c4ca.tar.bz2
rneovim-29712aef602b96d70c1cabbc7c717be1d045c4ca.zip
fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds #15372
Logic got swapped in 7574918dc7b823c4a22eeb4949acfb9381446eab. We didn't notice it since v:termresponse isn't really used yet. #6279
Diffstat (limited to 'src')
-rw-r--r--src/nvim/autocmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c
index 145f6f5601..bec9808183 100644
--- a/src/nvim/autocmd.c
+++ b/src/nvim/autocmd.c
@@ -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);
}