Fixed #609: Don't work with empty patterns
This commit is contained in:
parent
6fd1301ec2
commit
f72d388811
@ -217,7 +217,7 @@ function! vimtex#delim#get_delim_regexes(...) " {{{1
|
|||||||
return exists('s:re')
|
return exists('s:re')
|
||||||
\ ? [s:re.delim_math.open, s:re.delim_math.close,
|
\ ? [s:re.delim_math.open, s:re.delim_math.close,
|
||||||
\ s:re.delim_tex.open, s:re.delim_tex.close]
|
\ s:re.delim_tex.open, s:re.delim_tex.close]
|
||||||
\ : ['', '', '', '']
|
\ : []
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
|
@ -107,6 +107,8 @@ let s:envs_enditem = s:envs_item . '\|' . s:envs_endlist
|
|||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
function! s:indent_delims(line, lnum, prev_line, prev_lnum) " {{{1
|
function! s:indent_delims(line, lnum, prev_line, prev_lnum) " {{{1
|
||||||
|
if empty(s:re_delims) | return 0 | endif
|
||||||
|
|
||||||
let [l:text, l:math] = s:split(a:line, a:lnum)
|
let [l:text, l:math] = s:split(a:line, a:lnum)
|
||||||
let [l:prev_tex, l:prev_math] = s:split(a:prev_line, a:prev_lnum, 'prev')
|
let [l:prev_tex, l:prev_math] = s:split(a:prev_line, a:prev_lnum, 'prev')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user