# HG changeset patch # User Steve Losh # Date 1289356534 18000 # Node ID 41562b79f58a44347407fb85ee6c57a9babd7222 # Parent d8a13f17507fa7be142a56c69ee72d77e657d781 Add a g:gundo_help setting to disable the inline help. diff -r d8a13f17507f -r 41562b79f58a doc/gundo.txt --- a/doc/gundo.txt Tue Nov 09 21:13:21 2010 -0500 +++ b/doc/gundo.txt Tue Nov 09 21:35:34 2010 -0500 @@ -12,7 +12,8 @@ 3.2 gundo_preview_height ...... |gundo_preview_height| 3.3 gundo_preview_bottom ...... |gundo_preview_bottom| 3.4 gundo_right ............... |gundo_right| - 3.5 gundo_disable ............. |gundo_disable| + 3.5 gundo_help ................ |gundo_help| + 3.6 gundo_disable ............. |gundo_disable| 4. License ........................ |GundoLicense| 5. Bugs ........................... |GundoBugs| 6. Contributing ................... |GundoContributing| @@ -159,7 +160,14 @@ Default: 0 (off, open on the left side) ------------------------------------------------------------------------------ -3.5 g:gundo_disable *gundo_disable* +3.5 g:gundo_help *gundo_help* + +Set this to 0 to disable the help text in the Gundo graph window. + +Default: 1 (show the help) + +------------------------------------------------------------------------------ +3.6 g:gundo_disable *gundo_disable* Set this to 1 to disable Gundo entirely. @@ -198,6 +206,7 @@ current window, instead of moving to them. * Add the 'p' mapping to preview the result of reverting to the selected state. + * Add the g:gundo_help setting. v1.0.0 * Initial stable release. diff -r d8a13f17507f -r 41562b79f58a plugin/gundo.vim --- a/plugin/gundo.vim Tue Nov 09 21:13:21 2010 -0500 +++ b/plugin/gundo.vim Tue Nov 09 21:35:34 2010 -0500 @@ -54,8 +54,9 @@ if !exists('g:gundo_right')"{{{ let g:gundo_right = 0 endif"}}} - -let s:inline_help_length = 6 +if !exists('g:gundo_help')"{{{ + let g:gundo_help = 1 +endif"}}} "}}} @@ -511,6 +512,14 @@ endif endfunction"}}} +function! s:GundoInlineHelpLength()"{{{ + if g:gundo_help + return 6 + else + return 0 + endif +endfunction"}}} + "}}} "{{{ Gundo buffer settings @@ -723,8 +732,8 @@ let target_n = line('.') + (distance * a:direction) " Bound the movement to the graph. - if target_n <= s:inline_help_length - 1 - call cursor(s:inline_help_length, 0) + if target_n <= s:GundoInlineHelpLength() - 1 + call cursor(s:GundoInlineHelpLength(), 0) else call cursor(target_n, 0) endif @@ -849,7 +858,11 @@ result = [' ' + l for l in result] target = (vim.eval('g:gundo_target_f'), int(vim.eval('g:gundo_target_n'))) - header = (INLINE_HELP % target).splitlines() + + if int(vim.eval('g:gundo_help')): + header = (INLINE_HELP % target).splitlines() + else: + header = [] vim.command('call s:GundoOpenGraph()') vim.command('setlocal modifiable') diff -r d8a13f17507f -r 41562b79f58a site/index.html --- a/site/index.html Tue Nov 09 21:13:21 2010 -0500 +++ b/site/index.html Tue Nov 09 21:35:34 2010 -0500 @@ -93,6 +93,7 @@
  • g:gundo_preview_height
  • g:gundo_preview_bottom
  • g:gundo_right
  • +
  • g:gundo_help
  • g:gundo_disable
  • @@ -282,6 +283,13 @@

    Default: 0 (off, open on the left side)

    + +

    g:gundo_help

    + +

    Set this to 0 to disable the help text in the Gundo graph window.

    + +

    Default: 1 (show the help)

    +

    g:gundo_disable

    @@ -343,6 +351,7 @@ visible but not the current window, instead of moving to them. +
  • Add the g:gundo_help setting.
  • v1.0.0