sjl/gundo.vim — pull request #30 by simnalamburt (2014-12-14 21:42:43+00:00)
Title: 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.

###### Reference
- [215th line of src/nvim/api/buffer.c in neovim (a5edc5f2)](https://github.com/neovim/neovim/blob/a5edc5f2572d6d63f7f7a32ae6ec7bcabe1472b6/src/nvim/api/buffer.c#L215)