Fixed #609: Don't work with empty patterns

This commit is contained in:
Karl Yngve Lervåg 2016-10-27 16:04:38 +02:00
parent 6fd1301ec2
commit f72d388811
2 changed files with 3 additions and 1 deletions

View File

@ -217,7 +217,7 @@ function! vimtex#delim#get_delim_regexes(...) " {{{1
return exists('s:re')
\ ? [s:re.delim_math.open, s:re.delim_math.close,
\ s:re.delim_tex.open, s:re.delim_tex.close]
\ : ['', '', '', '']
\ : []
endfunction
" }}}1

View File

@ -107,6 +107,8 @@ let s:envs_enditem = s:envs_item . '\|' . s:envs_endlist
" }}}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:prev_tex, l:prev_math] = s:split(a:prev_line, a:prev_lnum, 'prev')