Commits

heavenshell committed ddedb62

Add auto preview global option

  • Participants
  • Parent commits a860f15

Comments (0)

Files changed (2)

autoload/gundo.vim

 if !exists("g:gundo_prefer_python3")"{{{
     let g:gundo_prefer_python3 = 0
 endif"}}}
+if !exists("g:gundo_auto_preview")"{{{
+    let g:gundo_auto_preview = 1
+endif"}}}
 
 let s:has_supported_python = 0
 if g:gundo_prefer_python3 && has('python3')"{{{
         call cursor(0, idx2 + 1)
     endif
 
-    call s:GundoRenderPreview()
+    if g:gundo_auto_preview == 1
+        call s:GundoRenderPreview()
+    endif
 endfunction"}}}
 
 "}}}
 ==============================================================================
 CONTENTS                                                      *Gundo-contents*
 
-    1. Intro .......................... |GundoIntro|
-    2. Usage .......................... |GundoUsage|
-    3. Configuration .................. |GundoConfig|
-        3.1 gundo_width ............... |gundo_width|
-        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_help ................ |gundo_help|
-        3.6 gundo_disable ............. |gundo_disable|
-        3.7 gundo_map_move_older ...... |gundo_map_move_older|
-            gundo_map_move_newer ...... |gundo_map_move_newer|
-        3.8 gundo_close_on_revert ..... |gundo_close_on_revert|
-        3.9 gundo_preview_statusline .. |gundo_preview_statusline|
-            gundo_tree_statusline ..... |gundo_tree_statusline|
-    4. License ........................ |GundoLicense|
-    5. Bugs ........................... |GundoBugs|
-    6. Contributing ................... |GundoContributing|
-    7. Changelog ...................... |GundoChangelog|
-    8. Credits ........................ |GundoCredits|
+    1. Intro ........................... |GundoIntro|
+    2. Usage ........................... |GundoUsage|
+    3. Configuration ................... |GundoConfig|
+        3.1  gundo_width ............... |gundo_width|
+        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_help ................ |gundo_help|
+        3.6  gundo_disable ............. |gundo_disable|
+        3.7  gundo_map_move_older ...... |gundo_map_move_older|
+             gundo_map_move_newer ...... |gundo_map_move_newer|
+        3.8  gundo_close_on_revert ..... |gundo_close_on_revert|
+        3.9  gundo_preview_statusline .. |gundo_preview_statusline|
+             gundo_tree_statusline ..... |gundo_tree_statusline|
+        3.10 gundo_auto_preview ........ |gundo_auto_preview|
+    4. License ......................... |GundoLicense|
+    5. Bugs ............................ |GundoBugs|
+    6. Contributing .................... |GundoContributing|
+    7. Changelog ....................... |GundoChangelog|
+    8. Credits ......................... |GundoCredits|
 
 ==============================================================================
 1. Intro                                                          *GundoIntro*
 
 Default: unset (windows use the default statusline)
 
+------------------------------------------------------------------------------
+3.10 g:gundo_auto_preview                                 *gundo_auto_preview*
+
+Set this to 1 to rendering diff automatically with cursor move.
+
+Default: 1 (auto preview diff)
+
 ==============================================================================
 4. License                                                      *GundoLicense*
 
 
 ==============================================================================
 7. Changelog                                                  *GundoChangelog*
-
+v2.3.1
+    * Add auto preview option.
 v2.3.0
     * Add statusline configuration.
 v2.2.2