Fix a bug when previewing the last change at a maxed out undolevel.

This commit is contained in:
Steve Losh 2010-11-09 20:56:24 -05:00
parent a98989b6f8
commit 5cd18132a7

View File

@ -419,7 +419,7 @@ def _goto_window_for_buffer_name(bn):
def _undo_to(n):
n = int(n)
if n == 0:
vim.command('silent earlier %s' % vim.eval('&undolevels'))
vim.command('silent earlier %s' % (int(vim.eval('&undolevels')) + 1))
else:
vim.command('silent undo %d' % n)