diff --git a/plugin/eregex.vim b/plugin/eregex.vim index 27f4d72..487247e 100644 --- a/plugin/eregex.vim +++ b/plugin/eregex.vim @@ -210,7 +210,7 @@ let loaded_eregex=1 "============================================================================= "Commands And Mappings: command! -nargs=? -range E2v :,call ExtendedRegex2VimRegexLineWise() -command! -nargs=? -count=1 M :let v:searchforward = Ematch(, ) | if > 1 | set hlsearch on | endif +command! -nargs=? -count=1 M :let s:eregex_tmp_hlsearch = &hlsearch | let v:searchforward = Ematch(, ) | if s:eregex_tmp_hlsearch == 1 | set hlsearch | endif "command! -nargs=? -range S :,call Esubstitute() command! -nargs=? -range S :,call Esubstitute() :noh