Skip to content
Browse files

Show updated key mappings in status window, fixes #51

If key mappings are changed in the options, now show the updated keys in
the status window.
  • Loading branch information...
1 parent 2bac500 commit f52dc2dc28403d6d08ea02c99c77fa35ac879baf @joonty committed
Showing with 14 additions and 3 deletions.
  1. +8 −3 plugin/python/vdebug/ui/vimui.py
  2. +6 −0 plugin/python/vdebug/util.py
View
11 plugin/python/vdebug/ui/vimui.py
@@ -426,9 +426,14 @@ class StatusWindow(Window):
name = "DebuggerStatus"
def on_create(self):
- self.write("Status: starting\nListening on port\nNot connected\n\nPress <F5> to start "+\
- "debugging, <F6> to stop/close. Type "+\
- ":help Vdebug for more information.")
+ keys = vdebug.util.Keymapper()
+ output = "Status: starting\nListening on port\nNot connected\n\n"
+ output += "Press %s to start debugging, " %(keys.run_key())
+ output += "%s to stop/close. " %(keys.close_key())
+ output += "Type :help Vdebug for more information."
+
+ self.write(output)
+
self.command('setlocal syntax=debugger_status')
if self.creation_count == 1:
cmd = 'au BufWinLeave %s :silent! bdelete %s' %(self.name,self.name)
View
6 plugin/python/vdebug/util.py
@@ -16,6 +16,12 @@ def __init__(self):
self.is_mapped = False
self.existing = []
+ def run_key(self):
+ return self.keymaps['run']
+
+ def close_key(self):
+ return self.keymaps['close']
+
def map(self):
if self.is_mapped:
return

0 comments on commit f52dc2d

Please sign in to comment.
Something went wrong with that request. Please try again.