chore: add TASK-025 (find: focused-match first char shows cursor color)
851342546ed3d02f3f5b6e201981dc92c32fc40a
Kevin Kortum <kevinkortum@me.com> · 2026-06-29 15:28
parent d561b28e
1 files changed
- → Find-focused-match-first-char-shows-cursor-color-instead-of-full-active-highlight.md +32 −0
@@ -0,0 +1,32 @@
+---
+id: TASK-025
+title: >-
+ Find: focused match first char shows cursor color instead of full active
+ highlight
+status: "\U0001F7E6 Backlog"
+assignee: []
+created_date: '2026-06-29 22:14'
+labels:
+ - bug
+dependencies: []
+priority: medium
+ordinal: 25000
+---
+
+## Description
+
+<!-- SECTION:DESCRIPTION:BEGIN -->
+In find mode (Ctrl+G), the focused/active match renders its first character in the cursor color (Pointer bg) while the rest of the match is the dark-yellow active highlight (SelBg/SelFg). Other (non-focused) matches render correctly in the light-yellow Highlight bg. The first char looks wrong — should be uniformly the active-match highlight.
+
+Root cause: editor.go View() (~line 602). moveToActive parks the cursor at the active match's start col. The active match row is rendered via renderSpansCursor, which paints the cell at Cursor.Col with cursorStyle (Foreground=Background, Background=Pointer) ON TOP of the already-applied findActiveStyle (Foreground=SelFg, Background=SelBg). So the first cell of the focused match always wins the cursor style.
+
+Fix direction: when find is active and the cursor sits on the active match, either suppress the cursor overlay on that match (let findActiveStyle own all cells) or render the cursor without clobbering the match bg. Add a render test.
+<!-- SECTION:DESCRIPTION:END -->
+
+## Acceptance Criteria
+<!-- AC:BEGIN -->
+- [ ] #1 Focused find match renders all chars in the active-match highlight (no cursor-colored first char)
+- [ ] #2 Non-focused matches still render in the light Highlight style
+- [ ] #3 Cursor still visible/correct when find bar is closed
+- [ ] #4 Regression test covers the focused-match render
+<!-- AC:END -->