Browse Source

fix SD-1873 - Unhandled WPF Exception when deleting text in text editor

pull/23/head
Siegfried Pammer 14 years ago
parent
commit
3c7c5d703f
  1. 4
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CaretReferencesRenderer.cs

4
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CaretReferencesRenderer.cs

@ -67,6 +67,10 @@ namespace ICSharpCode.AvalonEdit.AddIn
this.delayMoveTimer.Stop(); this.delayMoveTimer.Stop();
this.delayMoveTimer.Tick += TimerMoveTick; this.delayMoveTimer.Tick += TimerMoveTick;
this.editorView.TextArea.Caret.PositionChanged += CaretPositionChanged; this.editorView.TextArea.Caret.PositionChanged += CaretPositionChanged;
// fixes SD-1873 - Unhandled WPF Exception when deleting text in text editor
// clear highlights to avoid exceptions when trying to draw highlights in
// locations that have been deleted already.
this.editorView.Document.Changed += delegate { lastResolveResult = null; ClearHighlight(); };
} }
public void ClearHighlight() public void ClearHighlight()

Loading…
Cancel
Save