aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgmntroll <37435952+gmntroll@users.noreply.github.com>2021-08-16 12:43:21 +0500
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-16 14:43:36 +0100
commitbe58ba250ee253892ae5c80e89d9a372e89460dc (patch)
treebc3280eaa8102ece157220159c87005940cf0286 /src
parentd0e9a11e395a8b4004bdd92e4c7b0365e3800842 (diff)
downloadrneovim-be58ba250ee253892ae5c80e89d9a372e89460dc.tar.gz
rneovim-be58ba250ee253892ae5c80e89d9a372e89460dc.tar.bz2
rneovim-be58ba250ee253892ae5c80e89d9a372e89460dc.zip
backport: 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);
}