#1560 Second one of adjacent indicators missing

Bug
closed-fixed
scintilla (297)
5
2014-08-04
2013-12-03
No

When there are two adjacent instances of the same indicator (but with different values), only the first of them is drawn. This is because when attempting to skip the gap between the first and second indicator, Editor::DrawIndicators skips whatever run is there without checking whether it is actually a gap or already the next indicator.

Fix attached.

Steps to reproduce:
1. Build SciTE with the following patch applied:

diff -r 16c31b358e45 -r dbe50694c89e src/Credits.cxx
--- a/src/Credits.cxx   Tue Dec 03 10:13:37 2013 +1100
+++ b/src/Credits.cxx   Tue Dec 03 10:26:44 2013 +0100
@@ -412,6 +412,13 @@
        SString translator = GetTranslationToAbout("TranslationCredit", false);
        SetAboutStyle(wsci, trsSty, ColourRGB(0, 0, 0));
        AddStyledText(wsci, GetTranslationToAbout("Version").c_str(), trsSty);
+       wsci.Send(SCI_INDICSETSTYLE, 8, INDIC_BOX);
+       wsci.Send(SCI_SETINDICATORCURRENT, 8);
+       wsci.Send(SCI_SETINDICATORVALUE, 1);
+       int pos = wsci.Send(SCI_GETCURRENTPOS);
+       wsci.Send(SCI_INDICATORFILLRANGE, pos-7, 3);
+       wsci.Send(SCI_SETINDICATORVALUE, 2);
+       wsci.Send(SCI_INDICATORFILLRANGE, pos-4, 4);
        AddStyledText(wsci, " " VERSION_SCITE "\n", 1);
        AddStyledText(wsci, "    " __DATE__ " " __TIME__ "\n", 1);
        SetAboutStyle(wsci, 2, ColourRGB(0, 0, 0));
  1. Run SciTE, choose Help > About SciTE and check the appearance of the word "Version" on the second line.

Actual Result: "Ver" is boxed but "sion" is not.

Expected Result: Both "Ver" and "sion" are boxed.

1 Attachments

Related

Bugs: #1802

Discussion

  • Neil Hodgson

    Neil Hodgson - 2013-12-03
    • labels: --> scintilla
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
     
  • Christian Walther

    Thanks, you’re quick!

     
  • Neil Hodgson

    Neil Hodgson - 2013-12-12
    • status: open-fixed --> 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