MCPcopy Index your code
hub / github.com/bpython/bpython / on_edit_pos_changed

Method on_edit_pos_changed

bpython/urwid.py:1013–1018  ·  view source on GitHub ↗

Gets called when the cursor position inside the edit changed. Rehighlight the current line because there might be a paren under the cursor now.

(self, edit, position)

Source from the content-addressed store, hash-verified

1011 )
1012
1013 def on_edit_pos_changed(self, edit, position):
1014 """Gets called when the cursor position inside the edit changed.
1015 Rehighlight the current line because there might be a paren under
1016 the cursor now."""
1017 tokens = self.tokenize(self.current_line, False)
1018 edit.set_edit_markup(list(format_tokens(tokens)))
1019
1020 def handle_input(self, event):
1021 # Since most of the input handling here should be handled in the edit

Callers

nothing calls this directly

Calls 3

format_tokensFunction · 0.85
tokenizeMethod · 0.80
set_edit_markupMethod · 0.80

Tested by

no test coverage detected