Merge branch 'update/vital-over' into master
This commit is contained in:
commit
8a5f2efc03
@ -2,7 +2,7 @@
|
|||||||
" FILE: autoload/EasyMotion/command_line.vim
|
" FILE: autoload/EasyMotion/command_line.vim
|
||||||
" AUTHOR: haya14busa
|
" AUTHOR: haya14busa
|
||||||
" Reference: https://github.com/osyo-manga/vim-over
|
" Reference: https://github.com/osyo-manga/vim-over
|
||||||
" Last Change: 16 Feb 2014.
|
" Last Change: 17 Feb 2014.
|
||||||
" License: MIT license {{{
|
" License: MIT license {{{
|
||||||
" Permission is hereby granted, free of charge, to any person obtaining
|
" Permission is hereby granted, free of charge, to any person obtaining
|
||||||
" a copy of this software and associated documentation files (the
|
" a copy of this software and associated documentation files (the
|
||||||
@ -165,7 +165,8 @@ endfunction "}}}
|
|||||||
function! EasyMotion#command_line#GetInput(num_strokes, prev, direction) "{{{
|
function! EasyMotion#command_line#GetInput(num_strokes, prev, direction) "{{{
|
||||||
let s:num_strokes = a:num_strokes
|
let s:num_strokes = a:num_strokes
|
||||||
|
|
||||||
let s:search.prompt = s:getPromptMessage(a:num_strokes)
|
let s:prompt_base = s:getPromptMessage(a:num_strokes)
|
||||||
|
let s:search.set_prompt(s:prompt_base)
|
||||||
|
|
||||||
" Screen: cursor position, first and last line
|
" Screen: cursor position, first and last line
|
||||||
let s:orig_pos = getpos('.')
|
let s:orig_pos = getpos('.')
|
||||||
|
@ -25,9 +25,8 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! s:make(...)
|
function! s:make(...)
|
||||||
let prompt = get(a:, 1, ":")
|
|
||||||
let result = deepcopy(s:base)
|
let result = deepcopy(s:base)
|
||||||
let result.prompt = prompt
|
let result.set_prompt(get(a:, 1, ":"))
|
||||||
call result.connect(result, "_")
|
call result.connect(result, "_")
|
||||||
return result
|
return result
|
||||||
endfunction
|
endfunction
|
||||||
@ -39,9 +38,9 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
let s:base = {
|
let s:base = {
|
||||||
\ "prompt" : "",
|
|
||||||
\ "line" : {},
|
\ "line" : {},
|
||||||
\ "variables" : {
|
\ "variables" : {
|
||||||
|
\ "prompt" : "",
|
||||||
\ "char" : "",
|
\ "char" : "",
|
||||||
\ "input" : "",
|
\ "input" : "",
|
||||||
\ "tap_key" : "",
|
\ "tap_key" : "",
|
||||||
@ -130,6 +129,16 @@ function! s:base.input_key()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! s:base.set_prompt(prompt)
|
||||||
|
let self.variables.prompt = a:prompt
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! s:base.get_prompt()
|
||||||
|
return self.variables.prompt
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! s:base.insert(word, ...)
|
function! s:base.insert(word, ...)
|
||||||
if a:0
|
if a:0
|
||||||
call self.line.set(a:1)
|
call self.line.set(a:1)
|
||||||
@ -355,7 +364,7 @@ endfunction
|
|||||||
function! s:_echo_cmdline(cmdline)
|
function! s:_echo_cmdline(cmdline)
|
||||||
call s:redraw()
|
call s:redraw()
|
||||||
execute "echohl" a:cmdline.highlights.prompt
|
execute "echohl" a:cmdline.highlights.prompt
|
||||||
echon a:cmdline.prompt
|
echon a:cmdline.get_prompt()
|
||||||
echohl NONE
|
echohl NONE
|
||||||
echon a:cmdline.backward()
|
echon a:cmdline.backward()
|
||||||
if empty(a:cmdline.line.pos_word())
|
if empty(a:cmdline.line.pos_word())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user