From e9dbfa1d60c1deb8eb97cc02691912c841fb80e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Tue, 5 Apr 2016 13:58:11 +0200 Subject: [PATCH] Fix #417 --- indent/tex.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indent/tex.vim b/indent/tex.vim index b0a3c20..7492b50 100644 --- a/indent/tex.vim +++ b/indent/tex.vim @@ -113,7 +113,11 @@ endfunction " }}}1 function! s:indent_tikz(lnum, prev) " {{{1 - if vimtex#env#is_inside('tikzpicture') + let l:winview = winsaveview() + let l:inside_tikzpicture = vimtex#env#is_inside('tikzpicture') + call winrestview(l:winview) + + if l:inside_tikzpicture let l:prev_starts = a:prev =~# s:tikz_commands let l:prev_stops = a:prev =~# ';\s*$'