Cf. #544: Minor fix

This commit is contained in:
Karl Yngve Lervåg 2016-09-12 21:39:24 +02:00
parent 02768f5bad
commit e3028cb9cd

View File

@ -26,8 +26,6 @@ function! vimtex#format#init_script() " {{{1
\ '%(begin|end)\{[^}]*\}', \ '%(begin|end)\{[^}]*\}',
\ ], '|') . ')\s*$' \ ], '|') . ')\s*$'
\ . '|^\s*%(\\\]|\$\$)\s*$' \ . '|^\s*%(\\\]|\$\$)\s*$'
let s:textwidth = &l:textwidth == 0 ? 79 : &l:textwidth
endfunction endfunction
" }}}1 " }}}1
@ -49,6 +47,7 @@ function! vimtex#format#formatexpr() " {{{1
let l:bottom = v:lnum + v:count - 1 let l:bottom = v:lnum + v:count - 1
let l:lines_old = getline(l:top, l:bottom) let l:lines_old = getline(l:top, l:bottom)
let l:tries = 5 let l:tries = 5
let s:textwidth = &l:textwidth == 0 ? 79 : &l:textwidth
" This is a hack to make undo restore the correct position " This is a hack to make undo restore the correct position
if mode() !=# 'i' if mode() !=# 'i'