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
+1 -6
View File
@@ -302,11 +302,6 @@ function! VimVuePluginIndentMain(...)
call s:SetVueIndent() call s:SetVueIndent()
endfunction endfunction
let s:timer = exists('*timer_start') && !exists('SessionLoad') && !s:test call VimVuePluginIndentMain()
if s:timer
call timer_start(200, 'VimVuePluginIndentMain')
else
call VimVuePluginIndentMain()
endif
let b:did_indent = 1 let b:did_indent = 1
+1 -15
View File
@@ -202,27 +202,13 @@ function! s:SetExtraSyntax()
call s:SetCurrentSyntax() call s:SetCurrentSyntax()
endfunction endfunction
function! s:PostSetting()
if exists('s:main_timer')
unlet s:main_timer
endif
endfunction
function! VimVuePluginSyntaxMain(...) function! VimVuePluginSyntaxMain(...)
call s:Init() call s:Init()
let syntax_list = vue#GetSyntaxList(s:config_syntax) let syntax_list = vue#GetSyntaxList(s:config_syntax)
call s:LoadSyntaxList(syntax_list) call s:LoadSyntaxList(syntax_list)
call s:SetBlockSyntax(s:config_syntax) call s:SetBlockSyntax(s:config_syntax)
call s:SetExtraSyntax() call s:SetExtraSyntax()
call s:PostSetting()
endfunction endfunction
" Entry " Entry
let s:timer = exists('*timer_start') && !exists('SessionLoad') && !s:test call VimVuePluginSyntaxMain()
if s:timer
if !exists('s:main_timer')
let s:main_timer = timer_start(1, 'VimVuePluginSyntaxMain')
endif
else
call VimVuePluginSyntaxMain()
endif