Updated plugins

This commit is contained in:
amix
2019-12-30 14:28:38 +01:00
parent cb57890701
commit b56966e13c
16 changed files with 145 additions and 84 deletions

View File

@@ -79,7 +79,7 @@ endfunction
"specified
function! s:MenuItem.enabled()
if self.isActiveCallback != -1
return {self.isActiveCallback}()
return type(self.isActiveCallback) == type(function("tr")) ? self.isActiveCallback() : {self.isActiveCallback}()
endif
return 1
endfunction
@@ -94,7 +94,11 @@ function! s:MenuItem.execute()
call mc.showMenu()
else
if self.callback != -1
call {self.callback}()
if type(self.callback) == type(function("tr"))
call self.callback()
else
call {self.callback}()
endif
endif
endif
endfunction