MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / current_window

Method current_window

mitmproxy/tools/console/window.py:261–270  ·  view source on GitHub ↗

Returns the active window with a matching key context, ignoring overlays. If multiple stacks have an active widget with a matching key context, the currently focused stack is preferred.

(self, keyctx)

Source from the content-addressed store, hash-verified

259 return t
260
261 def current_window(self, keyctx):
262 """
263 Returns the active window with a matching key context, ignoring overlays.
264 If multiple stacks have an active widget with a matching key context,
265 the currently focused stack is preferred.
266 """
267 for s in self.stacks_sorted_by_focus():
268 t = s.top_window()
269 if t.keyctx == keyctx:
270 return t
271
272 def sig_focus(self, section):
273 self.focus_position = section

Callers 3

flowview_mode_setMethod · 0.80
flowview_modeMethod · 0.80
contentview_changedMethod · 0.80

Calls 2

top_windowMethod · 0.80

Tested by

no test coverage detected