Fixed #513: Unecessarily complex regexes
This commit is contained in:
parent
c56e893fd0
commit
326fd857a1
@ -197,16 +197,14 @@ function! s:highlight_matching_pair() " {{{1
|
|||||||
let l:corresponding = vimtex#delim#get_matching(l:current)
|
let l:corresponding = vimtex#delim#get_matching(l:current)
|
||||||
if empty(l:corresponding) | return | endif
|
if empty(l:corresponding) | return | endif
|
||||||
|
|
||||||
let [l:o, l:c] = l:current.is_open
|
let [l:open, l:close] = l:current.is_open
|
||||||
\ ? [l:current, l:corresponding]
|
\ ? [l:current, l:corresponding]
|
||||||
\ : [l:corresponding, l:current]
|
\ : [l:corresponding, l:current]
|
||||||
|
|
||||||
let w:vimtex_match_id1 = matchadd('MatchParen',
|
let w:vimtex_match_id1 = matchadd('MatchParen',
|
||||||
\ '\%' . l:o.lnum . 'l\%' . l:o.cnum . 'c' . l:o.re.this . '\ze\_.*'
|
\ '\%' . l:open.lnum . 'l\%' . l:open.cnum . 'c' . l:open.re.this)
|
||||||
\ . '\%' . l:c.lnum . 'l\%' . l:c.cnum . 'c' . l:c.re.this)
|
|
||||||
let w:vimtex_match_id2 = matchadd('MatchParen',
|
let w:vimtex_match_id2 = matchadd('MatchParen',
|
||||||
\ '\%' . l:o.lnum . 'l\%' . l:o.cnum . 'c' . l:o.re.this . '\_.*\zs'
|
\ '\%' . l:close.lnum . 'l\%' . l:close.cnum . 'c' . l:close.re.this)
|
||||||
\ . '\%' . l:c.lnum . 'l\%' . l:c.cnum . 'c' . l:c.re.this)
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user