Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/28/15 12:07:33 (10 years ago)
Author:
jkarder
Message:

#2077: changed error and warning markup handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CodeEditor/3.4/CodeEditor.cs

    r11825 r11835  
    7979        if (value == null) value = string.Empty;
    8080        if (prefix == value) return;
    81         if (prefixMarker != null) textMarkerService.Remove(prefixMarker);
     81        if (prefixMarker != null) prefixMarker.Delete();
    8282        Doc.Remove(0, prefix.Length);
    8383        prefix = value;
     
    9797        if (value == null) value = string.Empty;
    9898        if (suffix == value) return;
    99         if (suffixMarker != null) textMarkerService.Remove(suffixMarker);
     99        if (suffixMarker != null) suffixMarker.Delete();
    100100        Doc.Remove(Doc.TextLength - suffix.Length, suffix.Length);
    101101        suffix = value;
     
    244244
    245245      TextEditor.TextChanged += (sender, args) => {
    246         textMarkerService.RemoveAll(x => x != prefixMarker && x != suffixMarker);
     246        foreach (var marker in textMarkerService.TextMarkers) {
     247          if (marker == prefixMarker || marker == suffixMarker) continue;
     248          if (marker.Length != (int)marker.Tag)
     249            marker.Delete();
     250        }
    247251        OnTextEditorTextChanged();
    248252      };
     
    408412      marker.MarkerTypes = TextMarkerTypes.SquigglyUnderline;
    409413      marker.MarkerColor = error.IsWarning ? WarningColor : ErrorColor;
     414      marker.Tag = segment.Length;
    410415    }
    411416
Note: See TracChangeset for help on using the changeset viewer.