Method
find_partial_match_forward
(
self, search_term: str, include_current: bool = False
)
Source from the content-addressed store, hash-verified
| 160 | return self.index |
| 161 | |
| 162 | def find_partial_match_forward( |
| 163 | self, search_term: str, include_current: bool = False |
| 164 | ) -> int: |
| 165 | add = 0 if include_current else 1 |
| 166 | end = max(0, self.index - (1 - add)) |
| 167 | for idx in range(end): |
| 168 | val = self.entries_by_index[end - 1 - idx] |
| 169 | if search_term in val: |
| 170 | return idx + add |
| 171 | return self.index |
| 172 | |
| 173 | def last(self) -> str: |
| 174 | """Move forward to the end of the history.""" |
Tested by
no test coverage detected