246bc34b173f

Update inline help message to show real keymaps.

Instead of displaying hardcoded "j/k" for motion between undo states,
real keymaps are fetched from `g:gundo_map_move_older` and
`g:undo_map_move_never` variables.
[view raw] [browse files]
author Sergey Alexandrov <alexandrov88@gmail.com>
date Mon, 10 Jun 2013 17:41:15 +0200
parents 8c570a493d26
children d7e1349992cc
branches/tags (none)
files autoload/gundo.py

Changes

--- a/autoload/gundo.py	Sat Jun 02 17:31:48 2012 -0400
+++ b/autoload/gundo.py	Mon Jun 10 17:41:15 2013 +0200
@@ -273,7 +273,7 @@
 
 INLINE_HELP = '''\
 " Gundo for %s (%d)
-" j/k  - move between undo states
+" %s/%s  - move between undo states
 " p    - preview diff of selected and current states
 " <cr> - revert to selected state
 
@@ -424,9 +424,11 @@
     result = [' ' + l for l in result]
 
     target = (vim.eval('g:gundo_target_f'), int(vim.eval('g:gundo_target_n')))
+    mappings = (vim.eval('g:gundo_map_move_older'),
+                vim.eval('g:gundo_map_move_newer'))
 
     if int(vim.eval('g:gundo_help')):
-        header = (INLINE_HELP % target).splitlines()
+        header = (INLINE_HELP % (target + mappings)).splitlines()
     else:
         header = []