# HG changeset patch # User Steve Losh # Date 1453214807 0 # Node ID 3a3d8751bbe989566242e852dfabc7b335e649da # Parent 1be6a45c04c830b9b1841b4510a5651c5c2eafdb# Parent 9a42f3562a99a9de924c9518141b3e7f8f3ce4dd Merge pull request #30 from simnalamburt/nvim-support Neovim support: line buffers shouldn't contain newlines diff -r 9a42f3562a99 -r 3a3d8751bbe9 .hgtags --- a/.hgtags Mon Dec 15 06:29:40 2014 +0900 +++ b/.hgtags Tue Jan 19 14:46:47 2016 +0000 @@ -11,3 +11,4 @@ bf31800e9784bd83c220f18fafde215abc72c4ef v2.3.0 25b74fe299c35aba1bc54c4af3febad1682b682b v2.4.0 39f23f08456425288c4a7e0ab94bec34c0b629ab v2.5.0 +5eceebd06c39b670901d1b61c87aa07b7ac57f10 v2.6.0 diff -r 9a42f3562a99 -r 3a3d8751bbe9 autoload/gundo.py --- a/autoload/gundo.py Mon Dec 15 06:29:40 2014 +0900 +++ b/autoload/gundo.py Tue Jan 19 14:46:47 2016 +0000 @@ -361,7 +361,7 @@ before_name = 'Original' before_time = '' - after_name = node_after.n + after_name = str(node_after.n) after_time = _fmt_time(node_after.time) else: _undo_to(node_before.n) @@ -370,9 +370,9 @@ _undo_to(node_after.n) after_lines = vim.current.buffer[:] - before_name = node_before.n + before_name = str(node_before.n) before_time = _fmt_time(node_before.time) - after_name = node_after.n + after_name = str(node_after.n) after_time = _fmt_time(node_after.time) _undo_to(current) @@ -390,9 +390,9 @@ _undo_to(node_after.n) after_lines = vim.current.buffer[:] - before_name = node_before.n or 'Original' + before_name = str(node_before.n or 'Original') before_time = node_before.time and _fmt_time(node_before.time) or '' - after_name = node_after.n or 'Original' + after_name = str(node_after.n or 'Original') after_time = node_after.time and _fmt_time(node_after.time) or '' _undo_to(current) @@ -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 9a42f3562a99 -r 3a3d8751bbe9 autoload/gundo.vim --- a/autoload/gundo.vim Mon Dec 15 06:29:40 2014 +0900 +++ b/autoload/gundo.vim Tue Jan 19 14:46:47 2016 +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')"{{{ @@ -280,10 +283,10 @@ function! s:GundoOpen()"{{{ if !exists('g:gundo_py_loaded') if s:has_supported_python == 2 && g:gundo_prefer_python3 - exe 'py3file ' . s:plugin_path . '/gundo.py' + exe 'py3file ' . escape(s:plugin_path, ' ') . '/gundo.py' python3 initPythonModule() else - exe 'pyfile ' . s:plugin_path . '/gundo.py' + exe 'pyfile ' . escape(s:plugin_path, ' ') . '/gundo.py' python initPythonModule() endif diff -r 9a42f3562a99 -r 3a3d8751bbe9 doc/gundo.txt --- a/doc/gundo.txt Mon Dec 15 06:29:40 2014 +0900 +++ b/doc/gundo.txt Tue Jan 19 14:46:47 2016 +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* @@ -249,6 +257,9 @@ ============================================================================== 7. Changelog *GundoChangelog* +v2.6.0 + * Fix several Python-related bugs. + * Add g:gundo_return_on_revert option. v2.5.0 * Fix the help window to take custom mappings into account. * Add g:gundo_playback_delay option. diff -r 9a42f3562a99 -r 3a3d8751bbe9 site/index.html --- a/site/index.html Mon Dec 15 06:29:40 2014 +0900 +++ b/site/index.html Tue Jan 19 14:46:47 2016 +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

    +
    @@ -400,6 +409,16 @@

    Changelog

      +
    1. v2.6.0 +
        +
      • + Fix several Python-related bugs. +
      • +
      • + Add g:gundo_return_on_revert option. +
      • +
      +
    2. v2.5.0