Get previous history entry (up arrow).
(self)
| 814 | self._cursor = len(self._entries) |
| 815 | |
| 816 | def previous(self) -> str | None: |
| 817 | """Get previous history entry (up arrow).""" |
| 818 | if not self._entries: |
| 819 | return None |
| 820 | self._cursor = max(0, self._cursor - 1) |
| 821 | return self._entries[self._cursor] |
| 822 | |
| 823 | def next(self) -> str | None: |
| 824 | """Get next history entry (down arrow).""" |
no outgoing calls