(
self, search_term: str, include_current: bool = False
)
| 149 | return self.saved_line |
| 150 | |
| 151 | def find_match_forward( |
| 152 | self, search_term: str, include_current: bool = False |
| 153 | ) -> int: |
| 154 | add = 0 if include_current else 1 |
| 155 | end = max(0, self.index - (1 - add)) |
| 156 | for idx in range(end): |
| 157 | val = self.entries_by_index[end - 1 - idx] |
| 158 | if val.startswith(search_term): |
| 159 | return idx + (0 if include_current else 1) |
| 160 | return self.index |
| 161 | |
| 162 | def find_partial_match_forward( |
| 163 | self, search_term: str, include_current: bool = False |