(self, mode)
| 365 | return self._input_mode |
| 366 | |
| 367 | def set_input_mode(self, mode): |
| 368 | shape = {InputMode.NAVIGATION: 2, InputMode.REPLACE: 4}.get(mode, 6) |
| 369 | cursor = "\x1b[{} q".format(shape) |
| 370 | |
| 371 | sys.stdout.write(cursor) |
| 372 | sys.stdout.flush() |
| 373 | |
| 374 | self._input_mode = mode |
| 375 | |
| 376 | if shell.editing_mode == "vi" and shell.modal_cursor: |
| 377 | ViState._input_mode = InputMode.INSERT # type: ignore |