update vital

This commit is contained in:
haya14busa 2016-10-19 00:52:20 +09:00
parent 5c6f3cd9a7
commit 11632455de
8 changed files with 21 additions and 15 deletions

View File

@ -30,7 +30,7 @@ set cpo&vim
" }}} " }}}
" CommandLine: " CommandLine:
let s:V = vital#easymotion#of() let s:V = vital#easymotion#new()
let s:cmdline = s:V.import('Over.Commandline.Base') let s:cmdline = s:V.import('Over.Commandline.Base')
let s:modules = s:V.import("Over.Commandline.Modules") let s:modules = s:V.import("Over.Commandline.Modules")
let s:search = s:cmdline.make() let s:search = s:cmdline.make()

View File

@ -1,4 +1,4 @@
let s:V = vital#easymotion#of() let s:V = vital#easymotion#new()
let s:HitAHintMotion = s:V.import('HitAHint.Motion') let s:HitAHintMotion = s:V.import('HitAHint.Motion')
call EasyMotion#init() call EasyMotion#init()

View File

@ -1,5 +1,5 @@
let s:_plugin_name = expand('<sfile>:t:r') let s:_plugin_name = expand('<sfile>:t:r')
function! vital#{s:_plugin_name}#new() abort function! vital#{s:_plugin_name}#new() abort
return vital#{s:_plugin_name[1:]}#of() return vital#{s:_plugin_name[1:]}#new()
endfunction endfunction

View File

@ -56,7 +56,7 @@ function! s:module.redraw(cmdline)
" https://github.com/osyo-manga/vital-over/issues/52 " https://github.com/osyo-manga/vital-over/issues/52
" https://github.com/Lokaltog/vim-easymotion/issues/177#issuecomment-53663431 " https://github.com/Lokaltog/vim-easymotion/issues/177#issuecomment-53663431
if &cedit != "<C-c>" if &cedit != "<C-c>"
\ ||(v:version >= 704 && has("patch441")) \ ||(v:version > 704 || v:version == 704 && has("patch441"))
normal! : normal! :
else else
execute "normal! :\<Esc>" execute "normal! :\<Esc>"

View File

@ -16,22 +16,27 @@ endif
let s:save_cpo = &cpo let s:save_cpo = &cpo
set cpo&vim set cpo&vim
if v:version ># 703 || if v:version > 703 ||
\ (v:version is 703 && has('patch465')) \ (v:version == 703 && has('patch465'))
function! s:glob(expr) abort function! s:glob(expr) abort
return glob(a:expr, 1, 1) return glob(a:expr, 1, 1)
endfunction endfunction
else else
function! s:glob(expr) abort function! s:glob(expr) abort
let R = glob(a:expr, 1) return split(glob(a:expr, 1), '\n')
return split(R, '\n')
endfunction endfunction
endif endif
function! s:globpath(path, expr) abort if v:version > 704 ||
let R = globpath(a:path, a:expr, 1) \ (v:version == 704 && has('patch279'))
return split(R, '\n') function! s:globpath(path, expr) abort
endfunction return globpath(a:path, a:expr, 1, 1)
endfunction
else
function! s:globpath(path, expr) abort
return split(globpath(a:path, a:expr, 1), '\n')
endfunction
endif
" Wrapper functions for type(). " Wrapper functions for type().
let [ let [

View File

@ -133,6 +133,7 @@ function! s:read_content(content, ...) abort
\) \)
finally finally
call delete(tempfile) call delete(tempfile)
execute 'bwipeout!' tempfile
endtry endtry
endfunction endfunction

View File

@ -21,7 +21,7 @@ else
endfunction endfunction
endif endif
function! vital#{s:plugin_name}#of() abort function! vital#{s:plugin_name}#new() abort
return s:new(s:plugin_name) return s:new(s:plugin_name)
endfunction endfunction
@ -170,7 +170,7 @@ function! s:_import(name) abort dict
let s:loaded[a:name] = export_module let s:loaded[a:name] = export_module
if has_key(module, '_vital_loaded') if has_key(module, '_vital_loaded')
try try
call module._vital_loaded(vital#{s:plugin_name}#of()) call module._vital_loaded(vital#{s:plugin_name}#new())
catch catch
unlet s:loaded[a:name] unlet s:loaded[a:name]
throw 'vital: fail to call ._vital_loaded(): ' . v:exception throw 'vital: fail to call ._vital_loaded(): ' . v:exception

View File

@ -1,5 +1,5 @@
easymotion easymotion
64a8be0c1fbfbf944043fb22f16bab8c28756459 3404e200ca6b5f371811606e8399fefdf4595529
Over.Commandline.Base Over.Commandline.Base
Over.Commandline.Modules.Cancel Over.Commandline.Modules.Cancel