summaryrefslogtreecommitdiff
path: root/src/tag.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-12-11 21:29:51 +0000
committerBram Moolenaar <Bram@vim.org>2005-12-11 21:29:51 +0000
commit292ad19e925d5f90d78af8cbae2cf449cf4253f7 (patch)
tree2dbc9c64ff6e181e587cb352a361e3636c540190 /src/tag.c
parentcdbac1ee335a09ccfc965351e2e65c48b70d73dc (diff)
downloadvim-git-292ad19e925d5f90d78af8cbae2cf449cf4253f7.tar.gz
updated for version 7.0167
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/tag.c b/src/tag.c
index 4a19ba810..440e220e8 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -843,11 +843,22 @@ do_tag(tag, type, count, forceit, verbose)
}
}
+#ifdef FEAT_AUTOCMD
+ /* Let the SwapExists event know what tag we are jumping to. */
+ vim_snprintf((char *)IObuff, IOSIZE, ":ta %s\r", name);
+ set_vim_var_string(VV_SWAPCOMMAND, IObuff, -1);
+#endif
+
/*
* Jump to the desired match.
*/
- if (jumpto_tag(matches[cur_match], forceit, type != DT_CSCOPE)
- == NOTAGFILE)
+ i = jumpto_tag(matches[cur_match], forceit, type != DT_CSCOPE);
+
+#ifdef FEAT_AUTOCMD
+ set_vim_var_string(VV_SWAPCOMMAND, NULL, -1);
+#endif
+
+ if (i == NOTAGFILE)
{
/* File not found: try again with another matching tag */
if ((type == DT_PREV && cur_match > 0)