mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
Merge pull request #673 from jlhonora/master
Match g/G shortcuts to less
This commit is contained in:
commit
2af2e60f1f
@ -50,9 +50,9 @@ class EventListBox(urwid.ListBox):
|
||||
self.master.clear_events()
|
||||
key = None
|
||||
elif key == "G":
|
||||
self.set_focus(0)
|
||||
elif key == "g":
|
||||
self.set_focus(len(self.master.eventlist) - 1)
|
||||
elif key == "g":
|
||||
self.set_focus(0)
|
||||
return urwid.ListBox.keypress(self, size, key)
|
||||
|
||||
|
||||
@ -338,10 +338,10 @@ class FlowListBox(urwid.ListBox):
|
||||
self.master.clear_flows()
|
||||
elif key == "e":
|
||||
self.master.toggle_eventlog()
|
||||
elif key == "G":
|
||||
elif key == "g":
|
||||
self.master.state.set_focus(0)
|
||||
signals.flowlist_change.send(self)
|
||||
elif key == "g":
|
||||
elif key == "G":
|
||||
self.master.state.set_focus(self.master.state.flow_count())
|
||||
signals.flowlist_change.send(self)
|
||||
elif key == "l":
|
||||
|
@ -416,9 +416,9 @@ class GridEditor(urwid.WidgetWrap):
|
||||
res.append(i[0])
|
||||
self.callback(self.data_out(res), *self.cb_args, **self.cb_kwargs)
|
||||
signals.pop_view_state.send(self)
|
||||
elif key == "G":
|
||||
self.walker.set_focus(0)
|
||||
elif key == "g":
|
||||
self.walker.set_focus(0)
|
||||
elif key == "G":
|
||||
self.walker.set_focus(len(self.walker.lst) - 1)
|
||||
elif key in ["h", "left"]:
|
||||
self.walker.left()
|
||||
|
@ -28,7 +28,7 @@ class HelpView(urwid.ListBox):
|
||||
keys = [
|
||||
("j, k", "down, up"),
|
||||
("h, l", "left, right (in some contexts)"),
|
||||
("g, G", "go to end, beginning"),
|
||||
("g, G", "go to beginning, end"),
|
||||
("space", "page down"),
|
||||
("pg up/down", "page up/down"),
|
||||
("arrows", "up, down, left, right"),
|
||||
@ -108,8 +108,8 @@ class HelpView(urwid.ListBox):
|
||||
return None
|
||||
elif key == "?":
|
||||
key = None
|
||||
elif key == "G":
|
||||
self.set_focus(0)
|
||||
elif key == "g":
|
||||
self.set_focus(0)
|
||||
elif key == "G":
|
||||
self.set_focus(len(self.body.contents))
|
||||
return urwid.ListBox.keypress(self, size, key)
|
||||
|
@ -33,10 +33,10 @@ class Searchable(urwid.ListBox):
|
||||
self.find_next(False)
|
||||
elif key == "N":
|
||||
self.find_next(True)
|
||||
elif key == "G":
|
||||
elif key == "g":
|
||||
self.set_focus(0)
|
||||
self.walker._modified()
|
||||
elif key == "g":
|
||||
elif key == "G":
|
||||
self.set_focus(len(self.walker) - 1)
|
||||
self.walker._modified()
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user