mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-06 04:34:28 +08:00
Remove timer usage
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user