Neovim support: line buffers shouldn't contain newlines
The result of `difflib.unified_diff()` may contains newlines at the end of its
each line. It's suppressed in original Vim, but it's illegal in Neovim.
Since there is no good way to prevent `difflib` from appending newlines to the
results, `_output_preview_text()` function should sanitize it.
Thanks @michamos
Reference:
https://github.com/neovim/neovim/blob/a5edc5f2572d6d63f7f7a32ae6ec7bcabe1472b6/src/nvim/api/buffer.c#L215
https://github.com/sjl/gundo.vim/pull/30#issuecomment-170064637
author |
Hyeon Kim <simnalamburt@gmail.com> |
date |
Mon, 15 Dec 2014 06:29:40 +0900 |
parents |
3864df89353d |
children |
1be6a45c04c8 |
4101cbccf1d5fd0cfb81a3c6757c8f71657c1243 v0.8.0
4101cbccf1d5fd0cfb81a3c6757c8f71657c1243 semver
aa431c484c032ebc7b11e1e49c3b339d6d775384 v0.9.0
ede41dc6613eac08af5c98e69e123788b5a8e65a v1.0.0
e1365403fefc8b192252fa1dfda997f6c166ab60 v2.0.0
7fb1c286cca3c0c07974cc1b59002cfe2b7132f5 v2.1.0
dc582486455b428fc2ae50913b7844966ce64afc v2.1.1
d2406d0bce25549bb35c59767574386d3d241ace v2.2.0
c1cda256969c75523f9a8ef9629f08fca9ded216 v2.2.1
d6f98011d079bb1fd1bf6debb3f7cae55263b093 v2.2.2
bf31800e9784bd83c220f18fafde215abc72c4ef v2.3.0
25b74fe299c35aba1bc54c4af3febad1682b682b v2.4.0
39f23f08456425288c4a7e0ab94bec34c0b629ab v2.5.0