mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-10 14:41:52 +08:00
fix: indentation error when prev line is end tag and has_init_indent is
set
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user