# HG changeset patch
# User Jacob Parker
# Date 1377182710 14400
# Node ID 4cfd0c756bea8cf265afef8d222d33a3d94c351d
# Parent eb9fc8676b8959c3c2c95bf6b6e8f0f44317c5c0
added g:gundo_return_on_revert
diff -r eb9fc8676b89 -r 4cfd0c756bea autoload/gundo.py
--- a/autoload/gundo.py Wed Jul 10 20:37:26 2013 -0400
+++ b/autoload/gundo.py Thu Aug 22 10:45:10 2013 -0400
@@ -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 eb9fc8676b89 -r 4cfd0c756bea autoload/gundo.vim
--- a/autoload/gundo.vim Wed Jul 10 20:37:26 2013 -0400
+++ b/autoload/gundo.vim Thu Aug 22 10:45:10 2013 -0400
@@ -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_to_window_on_revert = 1
+endif"}}}
let s:has_supported_python = 0
if g:gundo_prefer_python3 && has('python3')"{{{
diff -r eb9fc8676b89 -r 4cfd0c756bea doc/gundo.txt
--- a/doc/gundo.txt Wed Jul 10 20:37:26 2013 -0400
+++ b/doc/gundo.txt Thu Aug 22 10:45:10 2013 -0400
@@ -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 eb9fc8676b89 -r 4cfd0c756bea site/index.html
--- a/site/index.html Wed Jul 10 20:37:26 2013 -0400
+++ b/site/index.html Thu Aug 22 10:45:10 2013 -0400
@@ -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
+