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