Skip to content

Commit 74f6d46

Browse files
authored
remove es6 semi-less do-while handling (#698)
1 parent 8ac7bad commit 74f6d46

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

indent/javascript.vim

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ function s:iscontOne(i,num,cont)
112112
while l:i >= l:num && (!l:cont || ind > pind)
113113
if indent(l:i) < ind " first line always true for !a:cont, false for !!a:cont
114114
if s:OneScope(l:i,s:Trim(l:i))
115-
if s:token() ==# 'while' &&
116-
\ s:GetPair('\C\<do\>','\C\<while\>','bW','line2byte(line(".")) + col(".") <'
117-
\ . (line2byte(l:num) + b:js_cache[2]) . '||'
118-
\ . s:skip_expr . '|| !s:IsBlock()',100,l:num) > 0
119-
return
120-
endif
121115
let bL += s:W
122116
let [l:cont, l:i] = [0, line('.')]
123117
elseif !l:cont
@@ -253,10 +247,6 @@ function GetJavascriptIndent()
253247
endif
254248

255249
if stmt || !num
256-
call cursor(v:lnum,1)
257-
if l:line =~# '^while\>' && s:GetPair('\C\<do\>','\C\<while\>','bW',s:skip_expr . '|| !s:IsBlock()',100,num + 1) > 0
258-
return indent(line('.'))
259-
endif
260250
let isOp = l:line =~# s:opfirst || pline =~# s:continuation
261251
let bL = s:iscontOne(l:lnum,num,isOp)
262252
let bL -= (bL && l:line[0] == '{') * s:W

0 commit comments

Comments
 (0)