diff --git a/indent/tex.vim b/indent/tex.vim index a8f5bd7..e320f06 100644 --- a/indent/tex.vim +++ b/indent/tex.vim @@ -118,7 +118,7 @@ function! VimtexIndent() " {{{1 let ind += &sw let s:tikz_indented += 1 endif - if s:tikz_indented > 0 && pline =~# ';\s*$' + if s:tikz_indented > 0 && pline =~# ';' let ind -= &sw let s:tikz_indented -= 1 endif diff --git a/test/test-indent/main.tex b/test/test-indent/main.tex index 8196717..931d153 100644 --- a/test/test-indent/main.tex +++ b/test/test-indent/main.tex @@ -1,6 +1,11 @@ \documentclass{minimal} +\usepackage{amsmath} +\usepackage{tikz} \begin{document} +\tikz \fill[green] rectangle (0.5,0.5); Something +about something. + \begin{align} 2+2=4 \end{align}