mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
vim-patch:7.4.746
Problem: ":[count]tag" is not always working. (cs86661)
Solution: Set cur_match a bit later. (Hirohito Higashi)
01cf376da1
This commit is contained in:
@@ -445,17 +445,10 @@ do_tag (
|
|||||||
tagmatchname = vim_strsave(name);
|
tagmatchname = vim_strsave(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
if (type == DT_TAG || type == DT_SELECT || type == DT_JUMP
|
||||||
* If a count is supplied to the ":tag <name>" command, then
|
|| type == DT_LTAG) {
|
||||||
* 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
|
|
||||||
|| type == DT_LTAG
|
|
||||||
)
|
|
||||||
cur_match = MAXCOL - 1;
|
cur_match = MAXCOL - 1;
|
||||||
|
}
|
||||||
max_num_matches = cur_match + 1;
|
max_num_matches = cur_match + 1;
|
||||||
|
|
||||||
/* when the argument starts with '/', use it as a regexp */
|
/* when the argument starts with '/', use it as a regexp */
|
||||||
@@ -511,8 +504,11 @@ do_tag (
|
|||||||
if (type == DT_CSCOPE && num_matches > 1) {
|
if (type == DT_CSCOPE && num_matches > 1) {
|
||||||
cs_print_tags();
|
cs_print_tags();
|
||||||
ask_for_selection = TRUE;
|
ask_for_selection = TRUE;
|
||||||
} else if (type == DT_SELECT ||
|
} else if (type == DT_TAG) {
|
||||||
(type == DT_JUMP && num_matches > 1)) {
|
// 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.
|
* List all the matching tags.
|
||||||
* Assume that the first match indicates how long the tags can
|
* Assume that the first match indicates how long the tags can
|
||||||
@@ -851,7 +847,7 @@ do_tag (
|
|||||||
|
|
||||||
|
|
||||||
ic = (matches[cur_match][0] & MT_IC_OFF);
|
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
|
||||||
&& type != DT_CSCOPE
|
&& type != DT_CSCOPE
|
||||||
&& (num_matches > 1 || ic)
|
&& (num_matches > 1 || ic)
|
||||||
&& !skip_msg) {
|
&& !skip_msg) {
|
||||||
|
@@ -388,7 +388,7 @@ static int included_patches[] = {
|
|||||||
// 749,
|
// 749,
|
||||||
// 748,
|
// 748,
|
||||||
// 747,
|
// 747,
|
||||||
// 746,
|
746,
|
||||||
745,
|
745,
|
||||||
// 744 NA
|
// 744 NA
|
||||||
// 743,
|
// 743,
|
||||||
|
Reference in New Issue
Block a user