private void ClearSquiggles(ScintillaNet.ScintillaControl sci) { if (sci == null) return; try { int es = sci.EndStyled; int mask = (1 << sci.StyleBits); sci.StartStyling(0, mask); sci.SetStyling(sci.TextLength, 0); sci.StartStyling(es, mask - 1); } finally { fileWithSquiggles = null; } }
private void AddSquiggles(ScintillaNet.ScintillaControl sci, int line, int start, int end) { if (sci == null) return; fileWithSquiggles = CurrentFile; int position = sci.PositionFromLine(line) + start; int es = sci.EndStyled; int mask = 1 << sci.StyleBits; sci.SetIndicStyle(0, (int)ScintillaNet.Enums.IndicatorStyle.Squiggle); sci.SetIndicFore(0, 0x000000ff); sci.StartStyling(position, mask); sci.SetStyling(end - start, mask); sci.StartStyling(es, mask - 1); }