INNER CODE UNIT · Python

action_search

idoavrah/terraform-tui · src/tftui/app.py:262

    def action_search(self) -> None:
        """Search the current pane: the tree filters, the others highlight."""
        target = self.view if self.view in (RESOURCE, PLAN) else TREE
        if target == TREE:
            self._show(TREE)

        # Re-entering the search box must keep what is already typed, so it can
        # be extended or corrected. The text only means something within one
        # pane, so switching panes starts afresh.
        if target != self._search_target:
            self._clear_search()
            self._search_target = target
        self.search_input.placeholder = _SEARCH_PLACEHOLDER[target]
        self.search_input.focus()

    def action_next_match(self) -> None:
        self._step_match(1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…