-
-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Labels
Description
Summary
Extend CodeScrollMarkerPanel with two new visual indicators overlaid on the vertical scrollbar:
- A bright yellow tick for the current caret line.
- A semi-transparent blue block spanning the active multi-line selection.
This gives VS-like at-a-glance position awareness on long files without any additional UI chrome.
Implementation
CodeScrollMarkerPanel
- New state fields:
_caretLine,_selectionStart,_selectionEnd. - New API:
UpdateCaretAndSelection(int caretLine, int selStart, int selEnd, int totalLines).selStart == -1→ no selection block rendered.totalLinesparameter used as proportional denominator (fold-corrected).
- Z-order in
OnRender: selection block → word-highlight ticks → caret tick (caret always topmost). - Static frozen brushes:
s_caretTick—ARGB(220, 255, 255, 100)bright yellow.s_selectionBlock—ARGB(70, 86, 156, 214)semi-transparent blue.
CodeEditor wiring
- Called from the render pass (
OnRender) every frame with the current_cursorLine, selection bounds (only when selection spans multiple lines), and fold-correctedvisibleLines.
Affected files
Sources/WpfHexEditor.Editor.CodeEditor/Controls/CodeScrollMarkerPanel.csSources/WpfHexEditor.Editor.CodeEditor/Controls/CodeEditor.cs—OnRender
Reactions are currently unavailable