Skip to content

Commit 3910ac4

Browse files
committed
Always use case sensitive pattern comparison
Caught by Neil Kirsopp in this commit: cursork/vim-clojure-static@c0a25e9 It makes sense to default to case sensitive comparison as individual patterns may be made case _insensitive_ with the `-c` flag.
1 parent 26deb47 commit 3910ac4

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

autoload/clojurecomplete.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function! clojurecomplete#Complete(findstart, base)
1515
if a:findstart
1616
return searchpos('\<', 'bnW', line('.'))[1] - 1
1717
else
18-
return { 'words': filter(copy(s:words), 'v:val =~ "\\V\\^' . a:base . '"') }
18+
return { 'words': filter(copy(s:words), 'v:val =~# "\\V\\^' . a:base . '"') }
1919
endif
2020
endfunction
2121

indent/clojure.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ if exists("*searchpairpos")
7070
endfunction
7171

7272
function! s:IsParen()
73-
return s:CurrentChar() =~ '\v[\(\)\[\]\{\}]' &&
73+
return s:CurrentChar() =~# '\v[\(\)\[\]\{\}]' &&
7474
\ s:SynIdName() !~? '\vstring|regex|comment|character'
7575
endfunction
7676

@@ -82,7 +82,7 @@ if exists("*searchpairpos")
8282
\ ? a:patterns
8383
\ : map(split(a:patterns, ','), '"^" . v:val . "$"')
8484
for pat in list
85-
if a:string =~ pat | return 1 | endif
85+
if a:string =~# pat | return 1 | endif
8686
endfor
8787
endfunction
8888

@@ -172,7 +172,7 @@ if exists("*searchpairpos")
172172

173173
call search('\S', 'W')
174174
let w = s:StripNamespaceAndMacroChars(s:CurrentWord())
175-
if g:clojure_special_indent_words =~ '\V\<' . w . '\>'
175+
if g:clojure_special_indent_words =~# '\V\<' . w . '\>'
176176
return 1
177177
endif
178178

@@ -280,7 +280,7 @@ if exists("*searchpairpos")
280280
" e.g. clojure.core/defn and #'defn should both indent like defn.
281281
let ww = s:StripNamespaceAndMacroChars(w)
282282

283-
if &lispwords =~ '\V\<' . ww . '\>'
283+
if &lispwords =~# '\V\<' . ww . '\>'
284284
return paren[1] + &shiftwidth - 1
285285
endif
286286

0 commit comments

Comments
 (0)