(
self, search_term: str, include_current: bool = False
)
| 105 | return list(chain((self.saved_line,), reversed(self.entries))) |
| 106 | |
| 107 | def find_match_backward( |
| 108 | self, search_term: str, include_current: bool = False |
| 109 | ) -> int: |
| 110 | add = 0 if include_current else 1 |
| 111 | start = self.index + add |
| 112 | for idx, val in enumerate(islice(self.entries_by_index, start, None)): |
| 113 | if val.startswith(search_term): |
| 114 | return idx + add |
| 115 | return 0 |
| 116 | |
| 117 | def find_partial_match_backward( |
| 118 | self, search_term: str, include_current: bool = False |