Skip to content

Find (cmd+f) selection jumps to a different match when new output streams in, instead of staying on the same text #9542

@amazansky

Description

@amazansky

Summary

When using cmd+f to search a block whose output is still streaming (for example, logs from a long-running server), the currently selected match jumps to a different piece of text as new matches are appended, instead of staying anchored to the originally selected match.

Problem

The find UI appears to identify the "currently selected" match by its index in an ordered list of matches rather than by a stable handle to the actual matched span. When new matches arrive earlier in the list (or the list is rebuilt to include the new output), the selection stays at the same numeric index (e.g. still "5 of N") and the highlighted text visibly changes, even though the user's selection should have shifted to a higher index to remain on the same text.

This makes find effectively unusable for inspecting a specific occurrence of a string in a block whose output is still being appended: the user keeps losing the location they navigated to whenever new matches arrive.

Expected behavior

While the match list grows due to new live output, the selection should remain anchored to the same underlying matched text. If new matches appear before the current one, the index should update accordingly (e.g. "5 of 100" becomes "6 of 101"), but the highlighted text should not change.

Actual behavior

The selection stays at the same numeric index as new matches stream in (e.g. "5 of 100" → "5 of 101") and visually jumps to whatever match now occupies that position. The text the user had navigated to is no longer highlighted, and they have to re-find it manually.

Reproduction steps or desired workflow

  1. Run a long-running command in a Warp block whose stdout/stderr produces lines containing some search term (for example, a server that periodically logs the word request).
  2. While output is still streaming, press cmd+f and search for that term.
  3. Use the find navigation to step to a specific match (e.g. result 5 of 100) and note which line is highlighted.
  4. Wait for new output containing additional occurrences of the search term to be appended.
  5. Observe that the highlighted match changes to a different line while the counter stays at "5 of N+k". The originally selected text is no longer the selected match.

Artifacts

None attached

Warp version

Unknown

Operating system

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:searchGlobal search, command palette, and content discovery.area:shell-terminalTerminal input/output, shell integration, prompt behavior, and block rendering.bugSomething isn't working.os:macmacOS-specific behavior, regressions, or requests.repro:highThe report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions