#1784 Indicators, with hover color, applied to wrapped text, behave independently per display line

Bug
closed-fixed
5
2016-01-18
2015-12-02
No

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

4 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2015-12-03
    • labels: --> scintilla, indicator, hover
    • status: open --> open-accepted
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2015-12-03

    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]

  • Neil Hodgson

    Neil Hodgson - 2016-01-18
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks