diff --git a/plugin/eregex.vim b/plugin/eregex.vim index db7800e..969a229 100644 --- a/plugin/eregex.vim +++ b/plugin/eregex.vim @@ -209,7 +209,7 @@ let loaded_eregex=1 "============================================================================= "Commands And Mappings: command! -nargs=? -range E2v :,call ExtendedRegex2VimRegexLineWise() -command! -nargs=? M :call Ematch() +command! -nargs=? -count M :let v:searchforward = Ematch() "command! -nargs=? -range S :,call Esubstitute() command! -nargs=? -range S :,call Esubstitute() :noh @@ -727,6 +727,11 @@ function! s:Ematch(...) echo v:errmsg endif + if delim == '?' + return 0 + else + return 1 + endif endfunction "end s:Ematch() "-----------------------------------------------------------------------------