Hi cs86661, 2015/5/17(Sun) 5:32:38 UTC+9 cs86661: > ctags command > ===== > :!ctags --c-kinds=+px --c++-kinds=+px --fields=+iaS --extra=+q -f test.c.tags > test.c > > :!ctags --c-kinds=+px --c++-kinds=+px --fields=+iaS --extra=+q -f test.h.tags > test.h > =====
I can reproduce and investigate it. Vim is not to have managed in the order in which they found the tags. Please see document. ":help tag-priority" However, found tags is less than equal 'mincount' that is fifth argument of find_tags(). (find_tags() is vim's C-function in src/tag.c) When found tags over the 'mincount', That is insufficient tag-priority order. I don't know this is documentation issue or bug. But I tried to write a patch if it was a bug. Please confirm if you have a few time. Thanks. -- Best regards, Hirohito Higashi (a.k.a h_east) -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
diff --git a/src/tag.c b/src/tag.c --- a/src/tag.c +++ b/src/tag.c @@ -508,17 +508,11 @@ 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 defined(FEAT_QUICKFIX) || type == DT_LTAG #endif + || (type == DT_TAG && *tag != NUL && count > 0) ) cur_match = MAXCOL - 1; max_num_matches = cur_match + 1; @@ -543,6 +537,12 @@ && new_num_matches < max_num_matches) max_num_matches = MAXCOL; /* If less than max_num_matches found: all matches found. */ + /* + * 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 there already were some matches for the same name, move them * to the start. Avoids that the order changes when using
