From 5cd18132a733697cddbb862f875f774540060fd5 Mon Sep 17 00:00:00 2001 From: Steve Losh Date: Tue, 9 Nov 2010 20:56:24 -0500 Subject: [PATCH] Fix a bug when previewing the last change at a maxed out undolevel. --- plugin/gundo.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/gundo.vim b/plugin/gundo.vim index d8b9602..29526e2 100644 --- a/plugin/gundo.vim +++ b/plugin/gundo.vim @@ -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)