Merge pull request #10 from bendavis78/master

Perform previous search when search term is empty
This commit is contained in:
othree 2014-10-09 11:52:43 +08:00
commit ea979eb7fc

View File

@ -712,10 +712,13 @@ endfunction
"end E2v() "end E2v()
"----------------------------------------------------------------------------- "-----------------------------------------------------------------------------
function! s:Ematch(...) function! s:Ematch(...)
if strlen(a:2) <= 1 | return | endif
let ccount = a:1 let ccount = a:1
if strlen(a:2) <= 1
let string = a:2 . @/
else
let string = a:2 let string = a:2
endif
let delim=string[0] let delim=string[0]
if delim !=# '/' && delim !=# '?' if delim !=# '/' && delim !=# '?'
@ -766,7 +769,7 @@ function! s:Ematch(...)
if v:errmsg ==# '' if v:errmsg ==# ''
redraw! redraw!
else else
echo 'M' . a:2 echo 'M' . string
echo v:errmsg echo v:errmsg
endif endif