mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-18 21:33:07 +02:00
don't update the buffer if unchanged
avoids setting empty save points in vim because the buffer is updated but has the same contents
This commit is contained in:
parent
ffe53db9cf
commit
292fdcbb87
1 changed files with 4 additions and 1 deletions
|
@ -20,6 +20,9 @@ class BufferProxy(object):
|
||||||
|
|
||||||
def push(self):
|
def push(self):
|
||||||
with util.current_line_preserved():
|
with util.current_line_preserved():
|
||||||
|
# Only set the buffer contents if the data is changed.
|
||||||
|
# Avoids extra undo events with empty diff.
|
||||||
|
if util.get_buffer(self.buffer_number)[:] != self.data:
|
||||||
util.get_buffer(self.buffer_number)[:] = self.data
|
util.get_buffer(self.buffer_number)[:] = self.data
|
||||||
|
|
||||||
def __getitem__(self, index):
|
def __getitem__(self, index):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue