# HG changeset patch # User Steve Losh # Date 1286574688 14400 # Node ID 39ffb4522c37d6019d929fcda54a2bd862e9d0b3 # Parent 2d608ce7ab0e30cdbcb05df57b3f03b70f2b2116 More. diff -r 2d608ce7ab0e -r 39ffb4522c37 plugin/gundo.vim --- a/plugin/gundo.vim Thu Oct 07 21:50:50 2010 -0400 +++ b/plugin/gundo.vim Fri Oct 08 17:51:28 2010 -0400 @@ -332,7 +332,26 @@ return buf.b dag = sorted(nodes, key=lambda n: int(n.n), reverse=True) + [root] -result = generate(walk_nodes(dag), asciiedges) -print result +result = generate(walk_nodes(dag), asciiedges).splitlines() + +target_buffer = vim.current.buffer.number +vim.command('new|wincmd H') +vim.command('vertical resize 30') + +gundo_buffer = vim.current.buffer.number +vim.current.buffer.append(result) + +i = 1 +for line in result: + try: + line.split('[')[0].index('@') + i += 1 + break + except ValueError: + pass + i += 1 +vim.command('%d' % i) + +vim.command('set ro') ENDPYTHON