Skip to content

Commit 1e52ed9

Browse files
authored
remove var
1 parent dcf820b commit 1e52ed9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

indent/javascript.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ function s:IsBlock(...)
119119
let l:ln = get(a:000,0,line('.'))
120120
if search('\S','bW')
121121
let char = getline('.')[col('.')-1]
122-
let pchar = getline('.')[col('.')-2]
123122
let syn = synIDattr(synID(line('.'),col('.')-(char == '{'),0),'name')
124123
if syn =~? '\%(xml\|jsx\)'
125124
return char != '{'
@@ -129,7 +128,7 @@ function s:IsBlock(...)
129128
return index(split('return const let import export yield default delete var void typeof throw new in instanceof')
130129
\ , expand('<cword>')) < (0 + (line('.') != l:ln))
131130
elseif char == '>'
132-
return pchar == '=' || syn =~? '^jsflow'
131+
return getline('.')[col('.')-2] == '=' || syn =~? '^jsflow'
133132
elseif char == ':'
134133
return cursor(0,match(' ' . strpart(getline('.'),0,col('.')),'.*\zs' . s:expr_case . '$')) + 1 &&
135134
\ (expand('<cword>') !=# 'default' || !search('\S','bW') || getline('.')[col('.')-1] !~ '[,{]')

0 commit comments

Comments
 (0)