diff options
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/core/Mono.TextEditor.Shared/Mono.TextEditor.Utils/CompressingTreeList.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor.Utils/CompressingTreeList.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor.Utils/CompressingTreeList.cs index 068763df76..4c86cc3fdf 100644 --- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor.Utils/CompressingTreeList.cs +++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor.Utils/CompressingTreeList.cs @@ -311,7 +311,8 @@ namespace Mono.TextEditor.Utils return GetNode (ref index).value; } set { - RemoveAt (index); + if (index < Count) + RemoveAt (index); Insert (index, value); } } |