Skip to content

Commit

Permalink
Update vital-Schedule module
Browse files Browse the repository at this point in the history
For speed tuning
  • Loading branch information
machakann committed Jun 1, 2018
1 parent 95cec1c commit eafae05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions autoload/vital/_highlightedyank/Schedule.vim
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ function! s:_inherit(sub, super) abort "{{{
call extend(a:sub, a:super, 'keep')
let a:sub.__SUPER__ = {}
let a:sub.__SUPER__.__CLASS__ = a:super.__CLASS__
for [key, l:Val] in items(a:super)
if type(l:Val) is v:t_func || key is# '__SUPER__'
let a:sub.__SUPER__[key] = l:Val
endif
endfor
let supermethods = filter(copy(a:super),
\ 'type(v:val) is# v:t_func || v:key is# "__SUPER__"')
call extend(a:sub.__SUPER__, supermethods)
return a:sub
endfunction "}}}

Expand Down Expand Up @@ -602,6 +600,7 @@ function! s:TaskChain.cancel() abort "{{{

let [trigger, _] = self._gettrigger()
call trigger.cancel()
call self._tick(self.leftcount())
return self
endfunction "}}}

Expand All @@ -618,6 +617,9 @@ function! s:_event_and_patterns(eventexpr) abort "{{{
elseif t_event is v:t_list
let event = a:eventexpr[0]
let pat = get(a:eventexpr, 1, '*')
if type(pat) is v:t_number
let pat = printf('<buffer=%d>', pat)
endif
else
echoerr s:InvalidTriggers(a:eventexpr)
endif
Expand Down
2 changes: 1 addition & 1 deletion autoload/vital/highlightedyank.vital
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
highlightedyank
92a0294e6550a3ca50cdbc1abe0d03c83664a59b
a8773a35b8b122b59c956a23d1e686d595bca3b4

Schedule

0 comments on commit eafae05

Please sign in to comment.