From ae996744a599845e97a82cceadbaae6e0efb87fe Mon Sep 17 00:00:00 2001 From: Steve Losh Date: Wed, 20 Oct 2010 18:33:48 -0400 Subject: [PATCH] Fix things when you've maxed out your undolevels. This sure is ugly, but it's the only efficient way I can find to do it. fixes issue 12 --- plugin/gundo.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugin/gundo.vim b/plugin/gundo.vim index 3ef90fc..1685555 100644 --- a/plugin/gundo.vim +++ b/plugin/gundo.vim @@ -556,11 +556,7 @@ def _goto_window_for_buffer_name(bn): def _undo_to(n): n = int(n) if n == 0: - try: - vim.command('silent! undo 1') - except vim.error: - return - vim.command('silent undo') + vim.command('silent earlier 999999999d') else: vim.command('silent undo %d' % n)