Merge pull request #77 from chrcoe/fix-python3-endline

fix endline in python3
This commit is contained in:
Chiel 2015-10-10 12:58:47 +02:00
commit bf56a4c12d

View File

@ -188,8 +188,9 @@ else:
# It is not entirely clear when and why that happens.
# However, extra newlines are almost never required, while there are linters that complain
# about superfluous newlines, so we remove one empty newline at the end of the file.
if stdoutdata[-1] == os.linesep:
stdoutdata = stdoutdata[:-1]
stdoutdata_decoded = stdoutdata.decode('utf-8')
if stdoutdata_decoded[-1] == os.linesep:
stdoutdata = stdoutdata_decoded[:-1]
vim.current.buffer[:] = stdoutdata.split(os.linesep)
EOF