diff --git a/pythonx/UltiSnips/buffer_proxy.py b/pythonx/UltiSnips/buffer_proxy.py index 9899874..1e007e7 100644 --- a/pythonx/UltiSnips/buffer_proxy.py +++ b/pythonx/UltiSnips/buffer_proxy.py @@ -95,9 +95,11 @@ class VimBufferProxy(_vim.VimBuffer): changes and applies them to the current snippet stack. """ if isinstance(key, slice): - value = [as_vimencoding(l) for l in value] + value = [as_vimencoding(line) for line in value] changes = list(self._get_diff(key.start, key.stop, value)) - self._buffer[key.start:key.stop] = value + self._buffer[key.start:key.stop] = [ + line.strip('\n') for line in value + ] else: value = as_vimencoding(value) changes = list(self._get_line_diff(key, self._buffer[key], value))