(self, edit, text)
| 998 | self.frame.body = self.listbox |
| 999 | |
| 1000 | def on_input_change(self, edit, text): |
| 1001 | # TODO: we get very confused here if "text" contains newlines, |
| 1002 | # so we cannot put our edit widget in multiline mode yet. |
| 1003 | # That is probably fixable... |
| 1004 | tokens = self.tokenize(text, False) |
| 1005 | edit.set_edit_markup(list(format_tokens(tokens))) |
| 1006 | if not self._completion_update_suppressed: |
| 1007 | # If we call this synchronously the get_edit_text() in repl.cw |
| 1008 | # still returns the old text... |
| 1009 | self.main_loop.set_alarm_in( |
| 1010 | 0, lambda *args: self._populate_completion() |
| 1011 | ) |
| 1012 | |
| 1013 | def on_edit_pos_changed(self, edit, position): |
| 1014 | """Gets called when the cursor position inside the edit changed. |
nothing calls this directly
no test coverage detected