Skip to content

Commit d6b2fd5

Browse files
authored
change regex case
1 parent 6ecbda3 commit d6b2fd5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

indent/javascript.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" Language: Javascript
33
" Maintainer: Chris Paul ( https://github.com/bounceme )
44
" URL: https://github.com/pangloss/vim-javascript
5-
" Last Change: September 23, 2016
5+
" Last Change: September 26, 2016
66

77
" Only load this indent file when no other was loaded.
88
if exists('b:did_indent')
@@ -109,9 +109,9 @@ endfunction
109109

110110
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
111111
function s:IsBlock()
112-
return getline(line('.'))[col('.')-1] == '{' && !search('\<return\s*\%#','nbW') && (search('\l\_s*\%#','bW') ? expand('<cword>') !~#
112+
return getline(line('.'))[col('.')-1] == '{' && !search('\C\<return\s*\%#','nbW') && (search('\l\_s*\%#','bW') ? expand('<cword>') !~#
113113
\ '\<\%(var\|const\|let\|import\|export\|yield\|de\%(fault\|lete\)\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)\>'
114-
\ : !search('\C\%([-=~!<*+,./?^%|&\[(]\|=\@<!>\)\_s*\%#','nbW') &&
114+
\ : !search('\%([-=~!<*+,./?^%|&\[(]\|=\@<!>\)\_s*\%#','nbW') &&
115115
\ (search(s:expr_case . '\_s*\%#','nbW') || !search('[{:]\_s*\%#','bW') || s:IsBlock()))
116116
endfunction
117117

0 commit comments

Comments
 (0)