From 38834e2aadce25c448bc5048298c1cdf4593ce8e Mon Sep 17 00:00:00 2001 From: Ben Davis Date: Tue, 7 Oct 2014 11:33:41 -0500 Subject: [PATCH] Perform previous search when search term is empty --- plugin/eregex.vim | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugin/eregex.vim b/plugin/eregex.vim index 2cb32f2..4eae55b 100644 --- a/plugin/eregex.vim +++ b/plugin/eregex.vim @@ -712,10 +712,13 @@ endfunction "end E2v() "----------------------------------------------------------------------------- function! s:Ematch(...) - if strlen(a:2) <= 1 | return | endif - let ccount = a:1 - let string = a:2 + if strlen(a:2) <= 1 + let string = a:2 . @/ + else + let string = a:2 + endif + let delim=string[0] if delim !=# '/' && delim !=# '?' @@ -766,7 +769,7 @@ function! s:Ematch(...) if v:errmsg ==# '' redraw! else - echo 'M' . a:2 + echo 'M' . string echo v:errmsg endif