@ -56,6 +56,8 @@ namespace ICSharpCode.TextEditor
SelectionManager selectionManager ;
SelectionManager selectionManager ;
Caret caret ;
Caret caret ;
bool disposed ;
public TextEditorControl MotherTextEditorControl {
public TextEditorControl MotherTextEditorControl {
get {
get {
return motherTextEditorControl ;
return motherTextEditorControl ;
@ -727,12 +729,17 @@ namespace ICSharpCode.TextEditor
// ++Caret.DesiredColumn;
// ++Caret.DesiredColumn;
}
}
protected override void Dispose ( bool disposing )
protected override void Dispose ( bool disposing )
{
{
base . Dispose ( disposing ) ;
base . Dispose ( disposing ) ;
if ( disposing ) {
if ( disposing ) {
Caret . Dispose ( ) ;
if ( ! disposed ) {
disposed = true ;
caret . PositionChanged - = new EventHandler ( SearchMatchingBracket ) ;
Document . TextContentChanged - = new EventHandler ( TextContentChanged ) ;
Document . FoldingManager . FoldingsChanged - = new EventHandler ( DocumentFoldingsChanged ) ;
caret . Dispose ( ) ;
}
}
}
}
}