Make command keys configurable

Fixes #672
This commit is contained in:
nanjekyejoannah 2016-08-16 14:45:20 +03:00 committed by Florian Bruhin
parent 8eb8039370
commit 056c0c3c14
2 changed files with 4 additions and 4 deletions

View File

@ -1477,6 +1477,9 @@ KEY_DATA = collections.OrderedDict([
('set-cmd-text :open -b -i {url:pretty}', ['xO']),
('set-cmd-text -s :open -w', ['wo']),
('set-cmd-text :open -w {url:pretty}', ['wO']),
('set-cmd-text -s :search', ['/']),
('set-cmd-text -s :search -r', ['?']),
('set-cmd-text -s : ', [':']),
('open -t', ['ga', '<Ctrl-T>']),
('open -w', ['<Ctrl-N>']),
('tab-close', ['d', '<Ctrl-W>']),

View File

@ -70,9 +70,6 @@ class NormalKeyParser(keyparser.CommandKeyParser):
self._debug_log("Ignoring key '{}', because the normal mode is "
"currently inhibited.".format(txt))
return self.Match.none
if not self._keystring and any(txt == c for c in STARTCHARS):
message.set_cmd_text(self._win_id, txt)
return self.Match.definitive
match = super()._handle_single_key(e)
if match == self.Match.partial:
timeout = config.get('input', 'partial-timeout')
@ -231,7 +228,7 @@ class HintKeyParser(keyparser.CommandKeyParser):
if keytype == self.Type.chain:
hintmanager = objreg.get('hintmanager', scope='tab',
window=self._win_id, tab='current')
hintmanager.handle_partial_key(cmdstr)
hintmanager.fire(cmdstr)
else:
# execute as command
super().execute(cmdstr, keytype, count)