# HG changeset patch # User Steve Losh # Date 1287614028 14400 # Node ID 185144163660bd24bc4d572a1017e09320394642 # Parent a53459d2b5075f2fc6d9f658976f09575145356d 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 diff -r a53459d2b507 -r 185144163660 plugin/gundo.vim --- a/plugin/gundo.vim Wed Oct 20 18:11:03 2010 -0400 +++ b/plugin/gundo.vim Wed Oct 20 18:33:48 2010 -0400 @@ -556,11 +556,7 @@ 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)