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()
|
self.master.clear_events()
|
||||||
key = None
|
key = None
|
||||||
elif key == "G":
|
elif key == "G":
|
||||||
self.set_focus(0)
|
|
||||||
elif key == "g":
|
|
||||||
self.set_focus(len(self.master.eventlist) - 1)
|
self.set_focus(len(self.master.eventlist) - 1)
|
||||||
|
elif key == "g":
|
||||||
|
self.set_focus(0)
|
||||||
return urwid.ListBox.keypress(self, size, key)
|
return urwid.ListBox.keypress(self, size, key)
|
||||||
|
|
||||||
|
|
||||||
@ -338,10 +338,10 @@ class FlowListBox(urwid.ListBox):
|
|||||||
self.master.clear_flows()
|
self.master.clear_flows()
|
||||||
elif key == "e":
|
elif key == "e":
|
||||||
self.master.toggle_eventlog()
|
self.master.toggle_eventlog()
|
||||||
elif key == "G":
|
elif key == "g":
|
||||||
self.master.state.set_focus(0)
|
self.master.state.set_focus(0)
|
||||||
signals.flowlist_change.send(self)
|
signals.flowlist_change.send(self)
|
||||||
elif key == "g":
|
elif key == "G":
|
||||||
self.master.state.set_focus(self.master.state.flow_count())
|
self.master.state.set_focus(self.master.state.flow_count())
|
||||||
signals.flowlist_change.send(self)
|
signals.flowlist_change.send(self)
|
||||||
elif key == "l":
|
elif key == "l":
|
||||||
|
@ -416,9 +416,9 @@ class GridEditor(urwid.WidgetWrap):
|
|||||||
res.append(i[0])
|
res.append(i[0])
|
||||||
self.callback(self.data_out(res), *self.cb_args, **self.cb_kwargs)
|
self.callback(self.data_out(res), *self.cb_args, **self.cb_kwargs)
|
||||||
signals.pop_view_state.send(self)
|
signals.pop_view_state.send(self)
|
||||||
elif key == "G":
|
|
||||||
self.walker.set_focus(0)
|
|
||||||
elif key == "g":
|
elif key == "g":
|
||||||
|
self.walker.set_focus(0)
|
||||||
|
elif key == "G":
|
||||||
self.walker.set_focus(len(self.walker.lst) - 1)
|
self.walker.set_focus(len(self.walker.lst) - 1)
|
||||||
elif key in ["h", "left"]:
|
elif key in ["h", "left"]:
|
||||||
self.walker.left()
|
self.walker.left()
|
||||||
|
@ -28,7 +28,7 @@ class HelpView(urwid.ListBox):
|
|||||||
keys = [
|
keys = [
|
||||||
("j, k", "down, up"),
|
("j, k", "down, up"),
|
||||||
("h, l", "left, right (in some contexts)"),
|
("h, l", "left, right (in some contexts)"),
|
||||||
("g, G", "go to end, beginning"),
|
("g, G", "go to beginning, end"),
|
||||||
("space", "page down"),
|
("space", "page down"),
|
||||||
("pg up/down", "page up/down"),
|
("pg up/down", "page up/down"),
|
||||||
("arrows", "up, down, left, right"),
|
("arrows", "up, down, left, right"),
|
||||||
@ -108,8 +108,8 @@ class HelpView(urwid.ListBox):
|
|||||||
return None
|
return None
|
||||||
elif key == "?":
|
elif key == "?":
|
||||||
key = None
|
key = None
|
||||||
elif key == "G":
|
|
||||||
self.set_focus(0)
|
|
||||||
elif key == "g":
|
elif key == "g":
|
||||||
|
self.set_focus(0)
|
||||||
|
elif key == "G":
|
||||||
self.set_focus(len(self.body.contents))
|
self.set_focus(len(self.body.contents))
|
||||||
return urwid.ListBox.keypress(self, size, key)
|
return urwid.ListBox.keypress(self, size, key)
|
||||||
|
@ -33,10 +33,10 @@ class Searchable(urwid.ListBox):
|
|||||||
self.find_next(False)
|
self.find_next(False)
|
||||||
elif key == "N":
|
elif key == "N":
|
||||||
self.find_next(True)
|
self.find_next(True)
|
||||||
elif key == "G":
|
elif key == "g":
|
||||||
self.set_focus(0)
|
self.set_focus(0)
|
||||||
self.walker._modified()
|
self.walker._modified()
|
||||||
elif key == "g":
|
elif key == "G":
|
||||||
self.set_focus(len(self.walker) - 1)
|
self.set_focus(len(self.walker) - 1)
|
||||||
self.walker._modified()
|
self.walker._modified()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user