INNER CODE UNIT · Python
action_previous_match
idoavrah/terraform-tui · src/tftui/app.py:280
def action_previous_match(self) -> None:
self._step_match(-1)
def _step_match(self, delta: int) -> None:
pane = self._searchable
if pane is None or not pane.match_count:
return
pane.step_match(delta)
self.switcher.border_title = self._search_title()
def _search_title(self) -> str:
"""The pane title, with the search position appended while searching."""
pane = self._searchable
title = pane.title if pane is not None else ""
if pane is None or not pane.needle:
return title
if not pane.match_count:
return f"{title} - no match"