# HG changeset patch # User Steve Losh # Date 1355334772 18000 # Node ID 06491cc1f4a227f1de701a336904967070d31671 # Parent 79d68c4332bf3c8a61ccaed7eb1a46e408fadbdf Remain in the proper buffer when diffing. diff -r 79d68c4332bf -r 06491cc1f4a2 autoload/splicelib/modes.py --- a/autoload/splicelib/modes.py Wed Dec 12 12:52:25 2012 -0500 +++ b/autoload/splicelib/modes.py Wed Dec 12 12:52:52 2012 -0500 @@ -13,8 +13,9 @@ def diff(self, diffmode): - with windows.remain(): - getattr(self, '_diff_%d' % diffmode)() + with buffers.remain(): + with windows.remain(): + getattr(self, '_diff_%d' % diffmode)() # Reset the scrollbind to whatever it was before we diffed. if not diffmode: diff -r 79d68c4332bf -r 06491cc1f4a2 autoload/splicelib/util/bufferlib.py --- a/autoload/splicelib/util/bufferlib.py Wed Dec 12 12:52:25 2012 -0500 +++ b/autoload/splicelib/util/bufferlib.py Wed Dec 12 12:52:52 2012 -0500 @@ -80,7 +80,7 @@ class remain: def __enter__(self): - self.curbuf = vim.eval('bufnr(bufname("%"))') + self.curbuf = int(vim.eval('bufnr(bufname("%"))')) self.pos = windows.pos() def __exit__(self, type, value, traceback):