(self)
| 300 | last_refresh_cache: RefreshCache = field(default_factory=RefreshCache) |
| 301 | |
| 302 | def __post_init__(self) -> None: |
| 303 | # Enable the use of `insert` without a `prepare` call - necessary to |
| 304 | # facilitate the tab completion hack implemented for |
| 305 | # <https://bugs.python.org/issue25660>. |
| 306 | self.keymap = self.collect_keymap() |
| 307 | self.input_trans = input.KeymapTranslator( |
| 308 | self.keymap, invalid_cls="invalid-key", character_cls="self-insert" |
| 309 | ) |
| 310 | self.screeninfo = [(0, [])] |
| 311 | self.cxy = self.pos2xy() |
| 312 | self.lxy = (self.pos, 0) |
| 313 | self.can_colorize = can_colorize() |
| 314 | |
| 315 | self.last_refresh_cache.screeninfo = self.screeninfo |
| 316 | self.last_refresh_cache.pos = self.pos |
| 317 | self.last_refresh_cache.cxy = self.cxy |
| 318 | self.last_refresh_cache.dimensions = (0, 0) |
| 319 | |
| 320 | def collect_keymap(self) -> tuple[tuple[KeySpec, CommandName], ...]: |
| 321 | return default_keymap |
nothing calls this directly
no test coverage detected