Append newline to text before sending to formatter.

This commit is contained in:
Chiel ten Brinke 2015-11-11 18:21:35 +01:00
parent 1243463143
commit 289c66899f

View File

@ -129,7 +129,7 @@ python << EOF
import vim, subprocess, os
from subprocess import Popen, PIPE
text = os.linesep.join(vim.current.buffer[:])
text = os.linesep.join(vim.current.buffer[:]) + '\n'
formatprg = vim.eval('&formatprg')
verbose = bool(int(vim.eval('verbose')))
env = os.environ.copy()
@ -177,7 +177,7 @@ python3 << EOF
import vim, subprocess, os
from subprocess import Popen, PIPE
text = bytes(os.linesep.join(vim.current.buffer[:]), 'utf-8')
text = bytes(os.linesep.join(vim.current.buffer[:]) + '\n', 'utf-8')
formatprg = vim.eval('&formatprg')
verbose = bool(int(vim.eval('verbose')))
env = os.environ.copy()