aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/if_cscope.c
diff options
context:
space:
mode:
authorDaniel Hahler <github@thequod.de>2017-03-11 13:56:23 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-03-11 13:56:23 +0100
commiteb8cbfc8f514c5c84741f782314dc9c256b6d977 (patch)
tree8fd1253df4cfabc8f9f6513a2d1b9571b106394b /src/nvim/if_cscope.c
parentd1afd434f30202410b217e7137c4a2a4fe055dbe (diff)
downloadrneovim-eb8cbfc8f514c5c84741f782314dc9c256b6d977.tar.gz
rneovim-eb8cbfc8f514c5c84741f782314dc9c256b6d977.tar.bz2
rneovim-eb8cbfc8f514c5c84741f782314dc9c256b6d977.zip
vim-patch:8.0.0068 (#6243)
Problem: Checking did_throw after executing autocommands is wrong. (Daniel Hahler) Solution: Call aborting() instead, and only when autocommands were executed. https://github.com/vim/vim/commit/21662be2211675824df1771c7f169948ede40c41
Diffstat (limited to 'src/nvim/if_cscope.c')
-rw-r--r--src/nvim/if_cscope.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c
index a05ac5f877..550d256de5 100644
--- a/src/nvim/if_cscope.c
+++ b/src/nvim/if_cscope.c
@@ -994,11 +994,12 @@ static int cs_find_common(char *opt, char *pat, int forceit, int verbose,
return FALSE;
}
- if (*qfpos != '0') {
- apply_autocmds(EVENT_QUICKFIXCMDPRE, (char_u *)"cscope",
- curbuf->b_fname, TRUE, curbuf);
- if (did_throw || force_abort)
- return FALSE;
+ if (*qfpos != '0'
+ && apply_autocmds(EVENT_QUICKFIXCMDPRE, (char_u *)"cscope",
+ curbuf->b_fname, true, curbuf)) {
+ if (aborting()) {
+ return false;
+ }
}
}