Commits

Steve Losh committed 06491cc

Remain in the proper buffer when diffing.

  • Participants
  • Parent commits 79d68c4

Comments (0)

Files changed (2)

autoload/splicelib/modes.py

 
 
     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:

autoload/splicelib/util/bufferlib.py

 
     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):