/// <summary> /// Processes the line changed. This will never be called inside the /// access' write lock. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> private void ProcessLineChanged( object sender, LineChangedArgs args) { // Make sure we're on the proper thread. CheckGuiThread(); // Get the line and reset it. CachedLine line = lines[args.LineIndex]; line.Reset(); // Call the base implementation to cascade the events up. base.OnLineChanged(sender, args); }
private void ClearCacheLines(TextRange selection) { LinePosition firstLinePosition = selection.FirstLinePosition; int firstLineIndex = firstLinePosition.GetLineIndex( LineBuffer, LinePositionOptions.NoBoundsChecking); LinePosition lastLinePosition = selection.LastLinePosition; int lastLineIndex = lastLinePosition.GetLineIndex( LineBuffer, LinePositionOptions.NoBoundsChecking); for (int lineIndex = firstLineIndex; lineIndex <= lastLineIndex; lineIndex++) { CachedLine line = lines[lineIndex]; line.Reset(); } }