Fix #4, supports ignorecase option

This commit is contained in:
othree_kao 2013-09-04 15:21:32 +08:00
parent e0501e3ee6
commit f01d0c30fc

View File

@ -738,6 +738,9 @@ function! s:Ematch(...)
let modifiers = substitute(offset, '\C[^' . s:str_modifiers . ']\+', "", "g") let modifiers = substitute(offset, '\C[^' . s:str_modifiers . ']\+', "", "g")
let offset = substitute(offset, '\C[' . s:str_modifiers . ']\+', "", "g") let offset = substitute(offset, '\C[' . s:str_modifiers . ']\+', "", "g")
endif endif
if &ignorecase
let modifiers .= 'i'
endif
let regex = s:ExtendedRegex2VimRegex(regex, modifiers) let regex = s:ExtendedRegex2VimRegex(regex, modifiers)
"v130 "v130
@ -800,6 +803,9 @@ function! s:Esubstitute(...) range
let modifiers = substitute(options, '\C[^' . s:str_modifiers . ']\+', "", "g") let modifiers = substitute(options, '\C[^' . s:str_modifiers . ']\+', "", "g")
let options = substitute(options, '\C[SCDmM]', "", "g") let options = substitute(options, '\C[SCDmM]', "", "g")
endif endif
if &ignorecase
let modifiers .= 'i'
endif
let regex = s:ExtendedRegex2VimRegex(regex, modifiers) let regex = s:ExtendedRegex2VimRegex(regex, modifiers)
"v130 "v130