From 134ba2be2576b6ff79de3c2e70b9343f4b4d8d95 Mon Sep 17 00:00:00 2001 From: chocolateboy Date: Sat, 17 Jan 2015 06:45:23 +0000 Subject: [PATCH] correctly handle &ignorecase and &smartcase (re-fixes #4 and #7) before (breaks &smartcase): default modifier to /i if &ignorecase and not /I after (honours &ignorecase and &smartcase): no default modifier i.e. vim default override defaults with (?i), (?I), \c, \C, /i and /I --- plugin/eregex.vim | 7 ------- 1 file changed, 7 deletions(-) diff --git a/plugin/eregex.vim b/plugin/eregex.vim index 84c37ec..5fdcb11 100644 --- a/plugin/eregex.vim +++ b/plugin/eregex.vim @@ -742,10 +742,6 @@ function! s:Ematch(...) let offset = substitute(offset, '\C[' . s:str_modifiers . ']\+', "", "g") endif - if &ignorecase && match(modifiers, 'I') == -1 - let modifiers .= 'i' - endif - let regex = s:ExtendedRegex2VimRegex(regex, modifiers) "v130 "set s:bakregex @@ -806,9 +802,6 @@ function! s:Esubstitute(...) range let modifiers = substitute(options, '\C[^' . s:str_modifiers . ']\+', "", "g") let options = substitute(options, '\C[SCDmM]', "", "g") endif - if &ignorecase && match(modifiers, 'I') == -1 - let modifiers .= 'i' - endif let regex = s:ExtendedRegex2VimRegex(regex, modifiers) "v130