added g:gundo_return_on_revert

This commit is contained in:
Jacob Parker 2013-08-22 10:45:10 -04:00
parent 3975ac8715
commit c8f2c67c77
4 changed files with 22 additions and 1 deletions

View File

@ -515,7 +515,8 @@ def GundoRevert():
_undo_to(target_n) _undo_to(target_n)
vim.command('GundoRenderGraph') vim.command('GundoRenderGraph')
_goto_window_for_buffer(back) if int(vim.eval('g:gundo_return_on_revert')):
_goto_window_for_buffer(back)
if int(vim.eval('g:gundo_close_on_revert')): if int(vim.eval('g:gundo_close_on_revert')):
vim.command('GundoToggle') vim.command('GundoToggle')

View File

@ -52,6 +52,9 @@ endif"}}}
if !exists("g:gundo_playback_delay")"{{{ if !exists("g:gundo_playback_delay")"{{{
let g:gundo_playback_delay = 60 let g:gundo_playback_delay = 60
endif"}}} endif"}}}
if !exists("g:gundo_return_on_revert")"{{{
let g:gundo_return_to_window_on_revert = 1
endif"}}}
let s:has_supported_python = 0 let s:has_supported_python = 0
if g:gundo_prefer_python3 && has('python3')"{{{ if g:gundo_prefer_python3 && has('python3')"{{{

View File

@ -21,6 +21,7 @@ CONTENTS *Gundo-contents*
gundo_tree_statusline ..... |gundo_tree_statusline| gundo_tree_statusline ..... |gundo_tree_statusline|
3.10 gundo_auto_preview ........ |gundo_auto_preview| 3.10 gundo_auto_preview ........ |gundo_auto_preview|
3.11 gundo_playback_delay ...... |gundo_playback_delay| 3.11 gundo_playback_delay ...... |gundo_playback_delay|
3.12 gundo_return_on_revert .... |gundo_return_on_revert|
4. License ......................... |GundoLicense| 4. License ......................... |GundoLicense|
5. Bugs ............................ |GundoBugs| 5. Bugs ............................ |GundoBugs|
6. Contributing .................... |GundoContributing| 6. Contributing .................... |GundoContributing|
@ -226,6 +227,13 @@ for a faster playback.
Default: 60 Default: 60
------------------------------------------------------------------------------
3.12 g:gundo_return_on_revert *gundo_return_on_revert*
Set this to 0 to keep focus in the Gundo window after a revert.
Default: 1
============================================================================== ==============================================================================
4. License *GundoLicense* 4. License *GundoLicense*

View File

@ -101,6 +101,7 @@
<li><a href="#gundo_statusline">g:gundo_[preview/tree]_statusline</a></li> <li><a href="#gundo_statusline">g:gundo_[preview/tree]_statusline</a></li>
<li><a href="#gundo_auto_preview">g:gundo_auto_preview</a></li> <li><a href="#gundo_auto_preview">g:gundo_auto_preview</a></li>
<li><a href="#gundo_playback_delay">g:gundo_playback_delay</a></li> <li><a href="#gundo_playback_delay">g:gundo_playback_delay</a></li>
<li><a href="#gundo_return_on_revert">g:gundo_return_on_revert</a></li>
</ul> </ul>
</li> </li>
<li><a href="#license">License</a></li> <li><a href="#license">License</a></li>
@ -359,6 +360,14 @@ let g:gundo_right = 1
</p> </p>
<p>Default: 60</p> <p>Default: 60</p>
<a name="gundo_return_on_revert"></a>
<h2>g:gundo_return_on_revert</h2>
<p>Set this to 0 to keep focus in the Gundo window after a revert.</p>
<p>Default: 1</p>
</section> </section>
<section> <section>
<a name="license"></a> <a name="license"></a>