]> granicus.if.org Git - vim/commitdiff
patch 7.4.746 v7.4.746
authorBram Moolenaar <Bram@vim.org>
Fri, 19 Jun 2015 14:45:43 +0000 (16:45 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 19 Jun 2015 14:45:43 +0000 (16:45 +0200)
Problem:    ":[count]tag" is not always working. (cs86661)
Solution:   Set cur_match a bit later. (Hirohito Higashi)

src/tag.c
src/version.c

index ba42f158c71d63babfc2f29a6813194f502a5478..8aaa86b96a6951609efdf0a045f5c237027d38d3 100644 (file)
--- a/src/tag.c
+++ b/src/tag.c
@@ -508,14 +508,7 @@ do_tag(tag, type, count, forceit, verbose)
                tagmatchname = vim_strsave(name);
            }
 
-           /*
-            * If a count is supplied to the ":tag <name>" command, then
-            * jump to count'th matching tag.
-            */
-           if (type == DT_TAG && *tag != NUL && count > 0)
-               cur_match = count - 1;
-
-           if (type == DT_SELECT || type == DT_JUMP
+           if (type == DT_TAG || type == DT_SELECT || type == DT_JUMP
 #if defined(FEAT_QUICKFIX)
                || type == DT_LTAG
 #endif
@@ -594,7 +587,13 @@ do_tag(tag, type, count, forceit, verbose)
            }
            else
 #endif
-           if (type == DT_SELECT || (type == DT_JUMP && num_matches > 1))
+           if (type == DT_TAG)
+               /*
+                * If a count is supplied to the ":tag <name>" command, then
+                * jump to count'th matching tag.
+                */
+               cur_match = count > 0 ? count - 1 : 0;
+           else if (type == DT_SELECT || (type == DT_JUMP && num_matches > 1))
            {
                /*
                 * List all the matching tags.
@@ -990,7 +989,7 @@ do_tag(tag, type, count, forceit, verbose)
 
 
            ic = (matches[cur_match][0] & MT_IC_OFF);
-           if (type != DT_SELECT && type != DT_JUMP
+           if (type != DT_TAG && type != DT_SELECT && type != DT_JUMP
 #ifdef FEAT_CSCOPE
                && type != DT_CSCOPE
 #endif
index b5e88554623ed5be3e7af7974b8c7d909c17dbc5..ed442034164ffd81a0af76d95a6e8184a985d638 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    746,
 /**/
     745,
 /**/