Display the history.
(self)
| 1049 | self.signatures = [] |
| 1050 | |
| 1051 | def enter_history(self) -> None: |
| 1052 | """ |
| 1053 | Display the history. |
| 1054 | """ |
| 1055 | app = self.app |
| 1056 | app.vi_state.input_mode = InputMode.NAVIGATION |
| 1057 | |
| 1058 | history = PythonHistory(self, self.default_buffer.document) |
| 1059 | |
| 1060 | import asyncio |
| 1061 | |
| 1062 | from prompt_toolkit.application import in_terminal |
| 1063 | |
| 1064 | async def do_in_terminal() -> None: |
| 1065 | async with in_terminal(): |
| 1066 | result = await history.app.run_async() |
| 1067 | if result is not None: |
| 1068 | self.default_buffer.text = result |
| 1069 | |
| 1070 | app.vi_state.input_mode = InputMode.INSERT |
| 1071 | |
| 1072 | asyncio.ensure_future(do_in_terminal()) |
| 1073 | |
| 1074 | def read(self) -> str: |
| 1075 | """ |
no test coverage detected