| 614 | return ANSI(instructions) |
| 615 | |
| 616 | def handle_scrolling(self, is_scroll_active): |
| 617 | self._is_scroll_active = is_scroll_active |
| 618 | |
| 619 | if not self._is_scroll_active: |
| 620 | self._output.text += self._output.pause_buffer.text |
| 621 | self._output.cursor_position = len(self._output.text) |
| 622 | self._output.pause_buffer.reset() |
| 623 | self._application.create_background_task( |
| 624 | self._trim_buffer(self._output) |
| 625 | ) |
| 626 | |
| 627 | if self._key_bindings.input_state == InputState.DISABLED: |
| 628 | self.update_bottom_toolbar(self.get_instructions()) |
| 629 | self._application.invalidate() |
| 630 | |
| 631 | def _create_metadata(self): |
| 632 | self._metadata = FormattedTextControl( |