mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2026-08-10 01:42:33 +08:00
Remove timer usage
This commit is contained in:
+1
-6
@@ -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
@@ -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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user