diff --git a/indent/tex.vim b/indent/tex.vim index 91908f801e..a07ea13052 100644 --- a/indent/tex.vim +++ b/indent/tex.vim @@ -53,7 +53,7 @@ function! VimtexIndent(lnum) abort " {{{1 " Use previous indentation for comments if l:line =~# '^\s*%' - return indent(a:lnum) + return indent(l:prev_lnum) endif " Remove comments before subsequent checks diff --git a/test/test-indentation/test_tikz_reference.tex b/test/test-indentation/test_tikz_reference.tex index 645740cf71..dfadfa130e 100644 --- a/test/test-indentation/test_tikz_reference.tex +++ b/test/test-indentation/test_tikz_reference.tex @@ -10,7 +10,7 @@ \begin{tikzpicture} \draw [solid] let \p{I} = (0,0) in (1,1) -| (\x{I}-1cm,-1cm) node [yshift=-.25cm] {(i)}; - % Just some comment + % Just some comment \end{tikzpicture} \begin{tikzpicture} @@ -19,7 +19,7 @@ (\x{I}-.75cm,-2.5) node [yshift=-.25cm] {(i)}; -% (ii) outer conductor of the contact head + % (ii) outer conductor of the contact head \coordinate (outerContactHead) at (.8,-1.7); \draw [solid] let \p{O} = (outerContactHead) in (outerContactHead) -- (\x{O},-2.5)