Cf. #544: Minor fix
This commit is contained in:
parent
02768f5bad
commit
e3028cb9cd
@ -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'
|
||||||
|
Loading…
Reference in New Issue
Block a user