feat: use theme colors for visual and copy mode selections#83
feat: use theme colors for visual and copy mode selections#83leohenon merged 3 commits intoleohenon:ocvfrom
Conversation
* make visual mode a bit more vim-like * cursor doesn't change color between normal and visual modes * selected text in visual mode uses a different background than cursor * extract CopyOverlay to share overlay rendering across messages
|
Nice improvements! Showing the character under the cursor is useful. Only thing I see is that in copy mode, the character under the cursor always stays readable, but in prompt Looks like copy mode renders the cursor with a contrast-aware foreground: selectedForeground(theme, theme.text)but prompt visual mode hardcodes the cursor cell to Can we make prompt visual mode use the same contrast-aware cursor colors as copy mode? |
|
I don't personally have the issue you mentioned, but did make some changes that should fix it for you. would you mind trying again? |
|
Interesting that you didn't see it, likely depends on how your terminal overlays the cursor on the cell. Your approach was close, but it didn't fully fix it for me, so I updated it to match copy mode exactly. looks good now. I was unsure at first about using themed selection instead of opencodes white/inverted, since it could look odd in some themes and inconsistent with the mouse. But I also think it makes sense here because it separates mouse selection from vim visual so let’s try it. |
Uh oh!
There was an error while loading. Please reload this page.