mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 10:26:23 +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)
|
self.prompt_execute(k)
|
||||||
elif k == "enter":
|
elif k == "enter":
|
||||||
self.prompt_execute()
|
self.prompt_execute()
|
||||||
|
else:
|
||||||
|
if common.is_keypress(k):
|
||||||
|
self.view.keypress(self.loop.screen_size, k)
|
||||||
else:
|
else:
|
||||||
k = self.view.keypress(self.loop.screen_size, k)
|
k = self.view.keypress(self.loop.screen_size, k)
|
||||||
if 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):
|
def highlight_key(s, k):
|
||||||
l = []
|
l = []
|
||||||
parts = s.split(k, 1)
|
parts = s.split(k, 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user