Fix a bug when previewing the last change at a maxed out undolevel.
author |
Steve Losh <steve@stevelosh.com> |
date |
Tue, 09 Nov 2010 20:56:24 -0500 |
parents |
d3fdfa4918f5
|
children |
d8a13f17507f
|
branches/tags |
(none) |
files |
plugin/gundo.vim |
Changes
--- a/plugin/gundo.vim Tue Nov 09 20:14:18 2010 -0500
+++ b/plugin/gundo.vim Tue Nov 09 20:56:24 2010 -0500
@@ -419,7 +419,7 @@
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)