vim-patch:7.4.2230 (#6080)

Problem:    There is no equivalent of 'smartcase' for a tag search.
Solution:   Add value "followscs" and "smart" to 'tagcase'. (Christian
            Brabandt, closes vim/vim#712) Turn tagcase test into new style.

66e29d7112
This commit is contained in:
lonerover
2017-02-25 22:42:25 +08:00
committed by Justin M. Keyes
parent 039c7ab607
commit 0ef2b07d69
8 changed files with 129 additions and 21 deletions

View File

@@ -308,13 +308,19 @@ void free_search_patterns(void)
*/
int ignorecase(char_u *pat)
{
int ic = p_ic;
return ignorecase_opt(pat, p_ic, p_scs);
}
if (ic && !no_smartcase && p_scs
/// As ignorecase() put pass the "ic" and "scs" flags.
int ignorecase_opt(char_u *pat, int ic_in, int scs)
{
int ic = ic_in;
if (ic && !no_smartcase && scs
&& !(ctrl_x_mode && curbuf->b_p_inf)
)
) {
ic = !pat_has_uppercase(pat);
no_smartcase = FALSE;
}
no_smartcase = false;
return ic;
}