39ffb4522c37
More.
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Fri, 08 Oct 2010 17:51:28 -0400 |
parents | 2d608ce7ab0e |
children | 715b023f84bf |
branches/tags | (none) |
files | plugin/gundo.vim |
Changes
--- 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