Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added g:gundo_return_on_revert #27

Merged
merged 2 commits into from
Dec 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion autoload/gundo.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,8 @@ def GundoRevert():
_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')
Expand Down
3 changes: 3 additions & 0 deletions autoload/gundo.vim
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ endif"}}}
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')"{{{
Expand Down
8 changes: 8 additions & 0 deletions doc/gundo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ CONTENTS *Gundo-contents*
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|
Expand Down Expand Up @@ -226,6 +227,13 @@ for a faster playback.

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*

Expand Down
9 changes: 9 additions & 0 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ <h2>Graph your Vim undo tree in style.</h2>
<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_playback_delay">g:gundo_playback_delay</a></li>
<li><a href="#gundo_return_on_revert">g:gundo_return_on_revert</a></li>
</ul>
</li>
<li><a href="#license">License</a></li>
Expand Down Expand Up @@ -359,6 +360,14 @@ <h2>g:gundo_playback_delay</h2>
</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>
<a name="license"></a>
Expand Down