fix: indentation error when prev line is end tag and has_init_indent is

set
This commit is contained in:
yemai
2019-06-19 17:08:32 +08:00
parent d5768eb528
commit d37185ccf6

View File

@@ -143,14 +143,15 @@ function! GetVueIndent()
endif endif
if curline =~? s:vue_tag || curline =~? s:vue_end_tag if curline =~? s:vue_tag || curline =~? s:vue_end_tag
call LogMsg('current line is vue tag') \|| prevline =~? s:vue_end_tag
call LogMsg('current line is vue tag or prev line is svelte end tag')
let ind = 0 let ind = 0
elseif s:has_init_indent elseif s:has_init_indent
if s:SynVueScope(cursyn) && ind == 0 if s:SynVueScope(cursyn) && ind == 0
call LogMsg('add initial indent') call LogMsg('add initial indent')
let ind = &sw let ind = &sw
endif endif
elseif prevline =~? s:vue_tag || prevline =~? s:vue_end_tag elseif prevline =~? s:vue_tag
call LogMsg('prev line is vue tag') call LogMsg('prev line is vue tag')
let ind = 0 let ind = 0
endif endif