Repository navigation
Conversation
Pike's cursor shares its color with error highlights, so it disappears over diagnostics. Swap the cursor colors on a matching cell background to keep the cursor and its block glyph visible, including with reverse video. Signed-off-by: Nikita Lipatov <6stringsohei@gmail.com>
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| if cell.Attrs&term.AttrReverse != 0 { | ||
| cellBG = tcellToColor(cell.Fg, r.fgColor, r.fgOpacity) | ||
| } | ||
| if bg != cellBG { |
There was a problem hiding this comment.
This never matches when guiopacity < 1. Cell colors go through applyOpacity, which premultiplies RGB and lowers alpha, but cursorBackground is always opaque. At opacity 0.9 a red cell resolves to {229 0 0 229} while the cursor is {255 0 0 255}, so nothing swaps.
Compare the colors before opacity is applied. For example, keep the cursor's term.Color on the renderer and compare its TrueColor() with the cell's (falling back to the default fg/bg when the cell color is ColorDefault). Please also add an opacity < 1 case to the table test.
The cursor was compared with premultiplied cell colors, so matching backgrounds were missed whenever opacity was below one. Compare RGB before opacity and retain the theme defaults for default-colored cells. Keep the swapped fill opaque so transparent cursor text cannot hide it. Signed-off-by: Nikita Lipatov <6stringsohei@gmail.com>
Pike uses the same color for the cursor and error highlights, so the cursor disappears
over diagnostics such as an invalid import. Swap the cursor's foreground and background
when its fill matches the visible cell background, keeping block cursor text readable
and respecting reverse video. Compare RGB before applying window opacity so transparent
backgrounds are handled too, and keep the swapped cursor fill opaque.
Validation
including default colors, reverse video, and an opaque cursor fill after swapping.
The opacity adjustment has automated coverage; manual verification was not repeated.
errcheckerrors in unchanged files:internal/ide/ideacp/manager.go:367,internal/llm/llamaserver/service.go:522, andinternal/text/exoeditor/handler.go:583.mockgenandprotocwere not installed.Generation and the e2e suite were not run for the opacity adjustment.
Authorship
Using AI is completely fine and encouraged, especially for reviewing your changes. We ask
so we can route the review: agent-authored code gets an agent review first, while
hand-written code deserves the respect of a human reviewer. Either way, a human who
understands the change must be able to answer questions about it.