From 83707ceb5bcfecd6e711d66dc7b32a080f49c9d5 Mon Sep 17 00:00:00 2001 From: othree Date: Tue, 11 Mar 2014 01:15:28 +0800 Subject: [PATCH] Fix #7, treat 'I' as noignorecase modifier --- plugin/eregex.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/eregex.vim b/plugin/eregex.vim index 97d780d..2cb32f2 100644 --- a/plugin/eregex.vim +++ b/plugin/eregex.vim @@ -738,7 +738,8 @@ function! s:Ematch(...) let modifiers = substitute(offset, '\C[^' . s:str_modifiers . ']\+', "", "g") let offset = substitute(offset, '\C[' . s:str_modifiers . ']\+', "", "g") endif - if &ignorecase + + if &ignorecase && match(modifiers, 'I') == -1 let modifiers .= 'i' endif @@ -803,7 +804,7 @@ function! s:Esubstitute(...) range let modifiers = substitute(options, '\C[^' . s:str_modifiers . ']\+', "", "g") let options = substitute(options, '\C[SCDmM]', "", "g") endif - if &ignorecase + if &ignorecase && match(modifiers, 'I') == -1 let modifiers .= 'i' endif