Skip to content

Scrollback Search

Scrollback search lets you find text in your terminal’s output buffer. Whether you are looking for an error message buried in a build log, a specific IP address in a configuration dump, or a timestamp in a log stream, search locates it instantly.

There are two ways to open the search bar:

  • Keyboard shortcut: Press Ctrl+F on a physical keyboard (desktop or tablet with keyboard attached).
  • Terminal menu: Tap the overflow menu (three dots) in the terminal toolbar and select Find in Terminal.

The search bar appears as a floating overlay at the top of the terminal, styled with the app’s dark theme and an orange accent border.

Type your query into the search field. ZestSSH scans every line in the terminal buffer (including scrollback history above the visible area) and highlights all matches.

Search is debounced at 200 milliseconds — results update as you type but without firing on every keystroke, keeping the terminal responsive even with large scrollback buffers.

All matches are highlighted in the terminal using the xterm highlight API:

  • Current match: highlighted with the theme’s searchHitBackgroundCurrent color (bright, high-contrast).
  • Other matches: highlighted with searchHitBackground (dimmer, still visible).

The match counter displays your position, e.g., 3/17 meaning you are on the 3rd match out of 17 total. If there are no results, the counter shows No results in red.

Use the up arrow and down arrow buttons next to the search field to jump between matches:

  • Down arrow (or pressing Enter): moves to the next match.
  • Up arrow: moves to the previous match.

Navigation wraps around — going past the last match takes you back to the first, and vice versa. When you first search, the current match starts at the last (most recent) match in the buffer, since you are most likely looking for something in recent output.

The Aa toggle button switches between case-insensitive (default) and case-sensitive search. When case-insensitive, searching for “error” matches “Error”, “ERROR”, and “error”. Toggle it on when you need exact case matching.

The toggle is styled with the orange accent color when active, making the current mode obvious at a glance.

Tap the X button on the right side of the search bar, or press Escape on a physical keyboard. All highlights are cleared from the terminal when search closes.

The search scans the full terminal buffer, which can include thousands of lines depending on your scrollback settings. The debounce timer and per-line scanning approach keep the search responsive. Each line is searched independently using Dart’s String.indexOf, which is efficient for typical query lengths.

Highlights are managed through the xterm controller’s highlight API, using buffer anchors for start and end positions. Anchors track their position even as new output shifts the buffer, though highlights from a previous search are always cleared before a new search begins.

  • Search operates on the rendered text content of each terminal line. It does not search through ANSI escape codes or invisible control characters.
  • Regex search is not currently supported — the search performs literal substring matching (with optional case insensitivity).
  • The search bar covers a small portion of the terminal viewport. You can still see and interact with the terminal while searching — terminal input is not blocked during search, so you can continue typing commands.