From 5e4e8ef3ef5f94214f7bf55126371f90a1277fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Tue, 2 Aug 2016 21:20:53 +0200 Subject: [PATCH] Fixed silly issue for older vims For some reason, on Vim 7.4.5 (tested with Travis), the line l:lines_old = l:lines_old[l:index:] did not work properly. This works properly with newer Vims, but this commit fixes it for older Vims. --- autoload/vimtex/format.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vimtex/format.vim b/autoload/vimtex/format.vim index 4e0fd1d..a88a95b 100644 --- a/autoload/vimtex/format.vim +++ b/autoload/vimtex/format.vim @@ -66,7 +66,7 @@ function! vimtex#format#formatexpr() " {{{1 let l:index = s:compare_lines(l:lines_new, l:lines_old) let l:top += l:index if l:top > l:bottom | break | endif - let l:lines_old = l:lines_new[l:index:] + let l:lines_old = l:lines_new[l:index : -1] let l:tries -= 1 endwhile