diff options
Diffstat (limited to 'main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs')
-rw-r--r-- | main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs index d9e440a2e2..023cea2ca4 100644 --- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs +++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs @@ -234,7 +234,6 @@ namespace Mono.TextEditor { if (args.Changes == null) return;
- cachedText = null; var changes = new List<TextChange> (); foreach (var change in args.Changes) { changes.Add (new TextChange (change.OldPosition, change.NewPosition, change.OldText, change.NewText)); @@ -337,16 +336,10 @@ namespace Mono.TextEditor public bool SuppressHighlightUpdate { get; set; } internal DocumentLine longestLineAtTextSet; - WeakReference cachedText; public string Text { get { - string completeText = cachedText != null ? (cachedText.Target as string) : null; - if (completeText == null) { - completeText = this.currentSnapshot.GetText (); - cachedText = new WeakReference(completeText); - } - return completeText; + return this.currentSnapshot.GetText (); } set { var tmp = IsReadOnly; |