Skip to content

Commit 34a070c

Browse files
authored
minor style changes
1 parent 9516192 commit 34a070c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

indent/javascript.vim

+2-4
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ endfunction
102102

103103
" Check if line 'lnum' has a balanced amount of parentheses.
104104
function s:Balanced(lnum)
105-
let open_0 = 0
106-
let open_2 = 0
107-
let open_4 = 0
105+
let [open_0,open_2,open_4] = [0,0,0]
108106
let l:line = getline(a:lnum)
109107
let pos = match(l:line, '[][(){}]', 0)
110108
while pos != -1
@@ -131,7 +129,7 @@ function GetJavascriptIndent()
131129
let syns = synIDattr(synID(v:lnum, 1, 0), 'name')
132130

133131
" start with strings,comments,etc.{{{2
134-
if (l:line !~ '^[''"`]' && syns =~? 'string\|template') ||
132+
if (l:line !~ '^[''"`]' && syns =~? '\%(string\|template\)') ||
135133
\ (l:line !~ '^\s*[/*]' && syns =~? s:syng_comment)
136134
return -1
137135
endif

0 commit comments

Comments
 (0)