From 64d6d48496568d1e83911db29860b267f32ff8ea Mon Sep 17 00:00:00 2001 From: Sergey Alexandrov Date: Mon, 10 Jun 2013 17:41:15 +0200 Subject: [PATCH] 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. --- autoload/gundo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/gundo.py b/autoload/gundo.py index 21d66f0..251c46b 100644 --- a/autoload/gundo.py +++ b/autoload/gundo.py @@ -273,7 +273,7 @@ def _undo_to(n): 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 " - revert to selected state @@ -424,9 +424,11 @@ def GundoRenderGraph(): 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 = []