Skip to content

fix(editor): highlight all visible search matches - #2838

Merged
bajrangCoder merged 1 commit into
mainfrom
fix-search-match-highlighting
Aug 30, 2026
Merged

fix(editor): highlight all visible search matches#2838
bajrangCoder merged 1 commit into
mainfrom
fix-search-match-highlighting

Conversation

@bajrangCoder

Copy link
Copy Markdown
Member

No description provided.

@greptile-apps

greptile-apps Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a viewport-bounded CodeMirror plugin that highlights every visible match for searches driven outside the native search panel.

  • Installs the custom highlighter alongside the editor search extension.
  • Recomputes decorations when the query, panel, document, selection, or viewport changes.
  • Adds unit coverage for query updates, selected matches, viewport bounding, overlapping ranges, and native-panel handoff.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

The new highlighter is conditionally composed with search support, limits scanning to expanded visible ranges, merges overlapping scan windows, and refreshes decorations for the state transitions that affect matching.

Important Files Changed

Filename Overview
src/cm/mainEditorExtensions.ts Registers the custom match highlighter whenever the main CodeMirror search extension is present.
src/cm/searchMatchHighlighter.ts Implements viewport-scoped search decorations and refreshes them across relevant editor-state transitions.
tests/unit/searchMatchHighlighter.test.ts Covers the principal decoration, viewport, selection, and panel-handoff behavior introduced by the plugin.

Reviews (1): Last reviewed commit: "fix(editor): highlight all visible searc..." | Re-trigger Greptile

@bajrangCoder
bajrangCoder added this pull request to the merge queue Aug 30, 2026
Merged via the queue into main with commit 289de09 Aug 30, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Aug 30, 2026
@bajrangCoder
bajrangCoder deleted the fix-search-match-highlighting branch August 30, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant