diff --git a/autoload/vimtex/delim.vim b/autoload/vimtex/delim.vim index e076a39..f84b075 100644 --- a/autoload/vimtex/delim.vim +++ b/autoload/vimtex/delim.vim @@ -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 diff --git a/indent/tex.vim b/indent/tex.vim index 62ec040..df387a2 100644 --- a/indent/tex.vim +++ b/indent/tex.vim @@ -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')