File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
" Language: Javascript
3
3
" Maintainer: Chris Paul ( https://github.com/bounceme )
4
4
" URL: https://github.com/pangloss/vim-javascript
5
- " Last Change: September 23 , 2016
5
+ " Last Change: September 26 , 2016
6
6
7
7
" Only load this indent file when no other was loaded.
8
8
if exists('b:did_indent')
@@ -109,9 +109,9 @@ endfunction
109
109
110
110
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
111
111
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>') !~#
113
113
\ '\<\%(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') &&
115
115
\ (search(s:expr_case . '\_s*\%#','nbW') || !search('[{:]\_s*\%#','bW') || s:IsBlock()))
116
116
endfunction
117
117
You can’t perform that action at this time.
0 commit comments