fix python3 compatibility

This commit is contained in:
Stanislav Seletskiy 2015-06-03 11:57:17 +06:00
parent 1ca82f76f7
commit 760fd25e47

View File

@ -35,12 +35,13 @@ class VimBufferHelper:
lambda line: line.strip('\n'), lambda line: line.strip('\n'),
value value
) )
map(self._apply_change, changes)
else: else:
changes = list(self._get_line_diff(key, self._buffer[key], value)) changes = list(self._get_line_diff(key, self._buffer[key], value))
self._buffer[key] = value self._buffer[key] = value
self._buffer_copy[key] = value self._buffer_copy[key] = value
map(self._apply_change, changes)
for change in changes:
self._apply_change(change)
def __getitem__(self, key): def __getitem__(self, key):
if isinstance(key, slice): if isinstance(key, slice):