When using SCI_INDICSETHOVERFORE to set an indicator hover color and SC_WRAP_WORD to display word wrapping, the indicator hover color works uniformly when the indicator range is all within one display line, but works independently per display line when the range of text is wrapped. This is best illustrated with the screenshots attached.
The code in C# below will setup the issue:
scintilla.Text = "welcome home";
scintilla.WrapMode = WrapMode.Word;
scintilla.Styles[Style.Default].SizeF = 16.0f;
scintilla.Indicators[8].Style = IndicatorStyle.FullBox;
scintilla.Indicators[8].ForeColor = Color.Red;
scintilla.Indicators[8].HoverForeColor = Color.Yellow;
scintilla.IndicatorCurrent = 8;
scintilla.IndicatorFillRange(0, scintilla.TextLength);
Thanks,
Jacob
Fix committed [588c31]. The main issue was that the text run for each line was checked to determine hover status instead of the whole run.
A secondary issue was that only the screen line containing the hover position was being redrawn when hover detected. The new code is less efficient as it redraws all text on screen, not just the line containing the hover position. Its complex to try to restore efficiency in cases with multiple overlapping dynamic indicators so not bothering for now.
Related
Commit: [588c31]