# HG changeset patch # User Steve Losh # Date 1449503713 0 # Node ID 4206a55f9922d21568780af8f2896ddc88c81bd7 # Parent 82d287f206dc4008c0359c953defd14ce775c9df# Parent 80be9ec7656dac2388d6c87ab2e7786f52783d75 Merge. diff -r 80be9ec7656d -r 4206a55f9922 autoload/gundo.py --- a/autoload/gundo.py Mon Dec 07 15:52:22 2015 +0000 +++ b/autoload/gundo.py Mon Dec 07 15:55:13 2015 +0000 @@ -515,7 +515,8 @@ _undo_to(target_n) 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')): vim.command('GundoToggle') diff -r 80be9ec7656d -r 4206a55f9922 autoload/gundo.vim --- a/autoload/gundo.vim Mon Dec 07 15:52:22 2015 +0000 +++ b/autoload/gundo.vim Mon Dec 07 15:55:13 2015 +0000 @@ -52,6 +52,9 @@ if !exists("g:gundo_playback_delay")"{{{ let g:gundo_playback_delay = 60 endif"}}} +if !exists("g:gundo_return_on_revert")"{{{ + let g:gundo_return_on_revert = 1 +endif"}}} let s:has_supported_python = 0 if g:gundo_prefer_python3 && has('python3')"{{{ diff -r 80be9ec7656d -r 4206a55f9922 doc/gundo.txt --- a/doc/gundo.txt Mon Dec 07 15:52:22 2015 +0000 +++ b/doc/gundo.txt Mon Dec 07 15:55:13 2015 +0000 @@ -21,6 +21,7 @@ gundo_tree_statusline ..... |gundo_tree_statusline| 3.10 gundo_auto_preview ........ |gundo_auto_preview| 3.11 gundo_playback_delay ...... |gundo_playback_delay| + 3.12 gundo_return_on_revert .... |gundo_return_on_revert| 4. License ......................... |GundoLicense| 5. Bugs ............................ |GundoBugs| 6. Contributing .................... |GundoContributing| @@ -226,6 +227,13 @@ 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* diff -r 80be9ec7656d -r 4206a55f9922 site/index.html --- a/site/index.html Mon Dec 07 15:52:22 2015 +0000 +++ b/site/index.html Mon Dec 07 15:55:13 2015 +0000 @@ -101,6 +101,7 @@
  • g:gundo_[preview/tree]_statusline
  • g:gundo_auto_preview
  • g:gundo_playback_delay
  • +
  • g:gundo_return_on_revert
  • License
  • @@ -359,6 +360,14 @@

    Default: 60

    + + +

    g:gundo_return_on_revert

    + +

    Set this to 0 to keep focus in the Gundo window after a revert.

    + +

    Default: 1

    +