aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorlonerover <pathfinder1644@yahoo.com>2017-02-25 22:42:25 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-02-25 15:42:25 +0100
commit0ef2b07d69c3f4da38219d8eef045232d18e9c37 (patch)
tree3ca4e0400bb279aef11678739f554c51f68d3261 /src/nvim/search.c
parent039c7ab60758661132c9bade0a4674190fa9442b (diff)
downloadrneovim-0ef2b07d69c3f4da38219d8eef045232d18e9c37.tar.gz
rneovim-0ef2b07d69c3f4da38219d8eef045232d18e9c37.tar.bz2
rneovim-0ef2b07d69c3f4da38219d8eef045232d18e9c37.zip
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. https://github.com/vim/vim/commit/66e29d7112e437b2b50efe1f82c7e892736d23e4
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index a9766a406e..ba6c4e6548 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -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;
}