From 1bf76753950d8a4cd98dc01293f3225fb542a617 Mon Sep 17 00:00:00 2001 From: othree_kao Date: Fri, 22 Feb 2013 18:32:18 +0800 Subject: [PATCH] Fix hlsearch behavior --- plugin/eregex.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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