Fix no highlight after loading session

This commit is contained in:
leafOfTree
2021-04-01 10:33:38 +08:00
parent 537af6139f
commit 11c04aaf7b
2 changed files with 6 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
" Language: Vue
" Maintainer: leaf <https://github.com/leafOfTree>
" CREDITS: Inspired by mxw/vim-jsx.
" Credits: Inspired by mxw/vim-jsx.
if exists('b:did_indent') | finish |endif
@@ -216,8 +216,10 @@ function! VimVuePluginIndentMain(...)
call s:SetVueIndent()
endfunction
if exists('*timer_start') && !s:test
if exists('*timer_start') && !exists('SessionLoad') && !s:test
call timer_start(50, 'VimVuePluginIndentMain')
else
call VimVuePluginIndentMain()
endif
let b:did_indent = 1

View File

@@ -1,6 +1,6 @@
" Language: Vue
" Maintainer: leaf <https://github.com/leafOfTree>
" CREDITS: Inspired by mxw/vim-jsx.
" Credits: Inspired by mxw/vim-jsx.
if exists('b:current_syntax') && b:current_syntax == 'vue'
finish
@@ -167,7 +167,7 @@ function! VimVuePluginSyntaxMain(...)
call s:HighlightVueTag()
endfunction
if exists('*timer_start') && !s:test
if exists('*timer_start') && !exists('SessionLoad') && !s:test
call timer_start(1, 'VimVuePluginSyntaxMain')
else
call VimVuePluginSyntaxMain()