Skip to content

Commit 4d60216

Browse files
authored
prevline = 0 at html
1 parent b5a2110 commit 4d60216

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

indent/javascript.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ endfunction
142142
function s:PrevCodeLine(lnum)
143143
let l:lnum = prevnonblank(a:lnum)
144144
while l:lnum
145-
if synIDattr(synID(l:lnum,matchend(getline(l:lnum), '^\s*[^''"`]'),0),'name') !~? s:syng_strcom
145+
let syn = synIDattr(synID(l:lnum,matchend(getline(l:lnum), '^\s*[^''"`]'),0),'name')
146+
if syn =~? 'html'
147+
return
148+
elseif syn !~? s:syng_strcom
146149
return l:lnum
147150
endif
148151
let l:lnum = prevnonblank(l:lnum - 1)

0 commit comments

Comments
 (0)