mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Fix general prompt input.
This commit is contained in:
parent
560e44c637
commit
558e0a41c2
@ -555,6 +555,9 @@ class ConsoleMaster(flow.FlowMaster):
|
||||
self.prompt_execute(k)
|
||||
elif k == "enter":
|
||||
self.prompt_execute()
|
||||
else:
|
||||
if common.is_keypress(k):
|
||||
self.view.keypress(self.loop.screen_size, k)
|
||||
else:
|
||||
k = self.view.keypress(self.loop.screen_size, k)
|
||||
if k:
|
||||
|
@ -31,6 +31,14 @@ METHOD_OPTIONS = [
|
||||
]
|
||||
|
||||
|
||||
def is_keypress(k):
|
||||
"""
|
||||
Is this input event a keypress?
|
||||
"""
|
||||
if isinstance(k, basestring):
|
||||
return True
|
||||
|
||||
|
||||
def highlight_key(s, k):
|
||||
l = []
|
||||
parts = s.split(k, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user