diff --git a/autoload/EasyMotion/command_line.vim b/autoload/EasyMotion/command_line.vim index 650c7d7..18ad282 100644 --- a/autoload/EasyMotion/command_line.vim +++ b/autoload/EasyMotion/command_line.vim @@ -30,7 +30,7 @@ set cpo&vim " }}} " CommandLine: -let s:V = vital#easymotion#of() +let s:V = vital#easymotion#new() let s:cmdline = s:V.import('Over.Commandline.Base') let s:modules = s:V.import("Over.Commandline.Modules") let s:search = s:cmdline.make() diff --git a/autoload/EasyMotion/overwin.vim b/autoload/EasyMotion/overwin.vim index 2669d2d..ea4d425 100644 --- a/autoload/EasyMotion/overwin.vim +++ b/autoload/EasyMotion/overwin.vim @@ -1,4 +1,4 @@ -let s:V = vital#easymotion#of() +let s:V = vital#easymotion#new() let s:HitAHintMotion = s:V.import('HitAHint.Motion') call EasyMotion#init() diff --git a/autoload/vital/_easymotion.vim b/autoload/vital/_easymotion.vim index ae19f5b..9eba177 100644 --- a/autoload/vital/_easymotion.vim +++ b/autoload/vital/_easymotion.vim @@ -1,5 +1,5 @@ let s:_plugin_name = expand(':t:r') function! vital#{s:_plugin_name}#new() abort - return vital#{s:_plugin_name[1:]}#of() + return vital#{s:_plugin_name[1:]}#new() endfunction diff --git a/autoload/vital/_easymotion/Over/Commandline/Modules/Redraw.vim b/autoload/vital/_easymotion/Over/Commandline/Modules/Redraw.vim index 5c22d91..c75e2b0 100644 --- a/autoload/vital/_easymotion/Over/Commandline/Modules/Redraw.vim +++ b/autoload/vital/_easymotion/Over/Commandline/Modules/Redraw.vim @@ -56,7 +56,7 @@ function! s:module.redraw(cmdline) " https://github.com/osyo-manga/vital-over/issues/52 " https://github.com/Lokaltog/vim-easymotion/issues/177#issuecomment-53663431 if &cedit != "" -\ ||(v:version >= 704 && has("patch441")) +\ ||(v:version > 704 || v:version == 704 && has("patch441")) normal! : else execute "normal! :\" diff --git a/autoload/vital/_easymotion/Prelude.vim b/autoload/vital/_easymotion/Prelude.vim index 7d44028..6eed3c8 100644 --- a/autoload/vital/_easymotion/Prelude.vim +++ b/autoload/vital/_easymotion/Prelude.vim @@ -16,22 +16,27 @@ endif let s:save_cpo = &cpo set cpo&vim -if v:version ># 703 || -\ (v:version is 703 && has('patch465')) +if v:version > 703 || +\ (v:version == 703 && has('patch465')) function! s:glob(expr) abort return glob(a:expr, 1, 1) endfunction else function! s:glob(expr) abort - let R = glob(a:expr, 1) - return split(R, '\n') + return split(glob(a:expr, 1), '\n') endfunction endif -function! s:globpath(path, expr) abort - let R = globpath(a:path, a:expr, 1) - return split(R, '\n') -endfunction +if v:version > 704 || +\ (v:version == 704 && has('patch279')) + function! s:globpath(path, expr) abort + 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(). let [ diff --git a/autoload/vital/_easymotion/Vim/Buffer.vim b/autoload/vital/_easymotion/Vim/Buffer.vim index 5b6d765..145c1d3 100644 --- a/autoload/vital/_easymotion/Vim/Buffer.vim +++ b/autoload/vital/_easymotion/Vim/Buffer.vim @@ -133,6 +133,7 @@ function! s:read_content(content, ...) abort \) finally call delete(tempfile) + execute 'bwipeout!' tempfile endtry endfunction diff --git a/autoload/vital/easymotion.vim b/autoload/vital/easymotion.vim index 4f9010c..d428cc2 100644 --- a/autoload/vital/easymotion.vim +++ b/autoload/vital/easymotion.vim @@ -21,7 +21,7 @@ else endfunction endif -function! vital#{s:plugin_name}#of() abort +function! vital#{s:plugin_name}#new() abort return s:new(s:plugin_name) endfunction @@ -170,7 +170,7 @@ function! s:_import(name) abort dict let s:loaded[a:name] = export_module if has_key(module, '_vital_loaded') try - call module._vital_loaded(vital#{s:plugin_name}#of()) + call module._vital_loaded(vital#{s:plugin_name}#new()) catch unlet s:loaded[a:name] throw 'vital: fail to call ._vital_loaded(): ' . v:exception diff --git a/autoload/vital/easymotion.vital b/autoload/vital/easymotion.vital index ee096f8..3ce5e05 100644 --- a/autoload/vital/easymotion.vital +++ b/autoload/vital/easymotion.vital @@ -1,5 +1,5 @@ easymotion -64a8be0c1fbfbf944043fb22f16bab8c28756459 +3404e200ca6b5f371811606e8399fefdf4595529 Over.Commandline.Base Over.Commandline.Modules.Cancel