From 262152aad0516ee4428dc4a7ff57fcf53b02cc99 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Thu, 6 Feb 2014 19:08:14 +0900 Subject: [PATCH] Update vital-over --- .../vital/_easymotion/Over/Commandline.vim | 18 +++++++++++------- .../Over/Commandline/Modules/Cancel.vim | 3 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/autoload/vital/_easymotion/Over/Commandline.vim b/autoload/vital/_easymotion/Over/Commandline.vim index 28c64f2..16bb490 100644 --- a/autoload/vital/_easymotion/Over/Commandline.vim +++ b/autoload/vital/_easymotion/Over/Commandline.vim @@ -137,7 +137,11 @@ function! s:base.is_input(key, ...) let prekey = get(a:, 1, "") return self.get_tap_key() == prekey \ && self.char() == a:key -" \ && s:_unmap(self._get_keymapping(), self.char()).key == a:key +endfunction + + +function! s:base.input_key() + return self.variables.input_key endfunction @@ -219,10 +223,10 @@ function! s:base.exit(...) endfunction -function! s:base.cancel() - call self.exit(1) - call self._on_cancel() -endfunction +" function! s:base.cancel() +" call self.exit(1) +" call self._on_cancel() +" endfunction function! s:base.exit_code() @@ -328,9 +332,9 @@ function! s:base._main(...) while !self._is_exit() call s:_echo_cmdline(self) - let self.variables.char = s:_unmap(self._get_keymapping(), s:_getchar()) + let self.variables.input_key = s:_getchar() + let self.variables.char = s:_unmap(self._get_keymapping(), self.variables.input_key) -" let self.variables.char = s:_getchar() call self.setchar(self.variables.char) call self._on_char_pre() diff --git a/autoload/vital/_easymotion/Over/Commandline/Modules/Cancel.vim b/autoload/vital/_easymotion/Over/Commandline/Modules/Cancel.vim index 7961efc..ba7d437 100644 --- a/autoload/vital/_easymotion/Over/Commandline/Modules/Cancel.vim +++ b/autoload/vital/_easymotion/Over/Commandline/Modules/Cancel.vim @@ -11,7 +11,8 @@ function! s:module.on_char_pre(cmdline) \ || a:cmdline.is_input("\") \ ||(a:cmdline.is_input("\") && a:cmdline.line.length() == 0) \ ||(a:cmdline.is_input("\") && a:cmdline.line.length() == 0) - call a:cmdline.cancel() +" call a:cmdline.cancel() + call a:cmdline.exit(1) call a:cmdline.setchar("") endif endfunction