Remove timer usage

This commit is contained in:
leafOfTree
2023-01-31 17:29:23 +08:00
parent 8d75429260
commit 4d31393b03
2 changed files with 2 additions and 21 deletions

View File

@@ -302,11 +302,6 @@ function! VimVuePluginIndentMain(...)
call s:SetVueIndent()
endfunction
let s:timer = exists('*timer_start') && !exists('SessionLoad') && !s:test
if s:timer
call timer_start(200, 'VimVuePluginIndentMain')
else
call VimVuePluginIndentMain()
endif
call VimVuePluginIndentMain()
let b:did_indent = 1

View File

@@ -202,27 +202,13 @@ function! s:SetExtraSyntax()
call s:SetCurrentSyntax()
endfunction
function! s:PostSetting()
if exists('s:main_timer')
unlet s:main_timer
endif
endfunction
function! VimVuePluginSyntaxMain(...)
call s:Init()
let syntax_list = vue#GetSyntaxList(s:config_syntax)
call s:LoadSyntaxList(syntax_list)
call s:SetBlockSyntax(s:config_syntax)
call s:SetExtraSyntax()
call s:PostSetting()
endfunction
" Entry
let s:timer = exists('*timer_start') && !exists('SessionLoad') && !s:test
if s:timer
if !exists('s:main_timer')
let s:main_timer = timer_start(1, 'VimVuePluginSyntaxMain')
endif
else
call VimVuePluginSyntaxMain()
endif
call VimVuePluginSyntaxMain()