From 096c88c954698ad1c2d45c0baa3e29dcc3b23b63 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 21 Jan 2014 21:03:02 +0100 Subject: [PATCH] fix #282: Pressing Ctrl+Z in InsertWithCursor mode causes InvalidOperationException --- .../Project/Src/Refactoring/EditorScript.cs | 87 +++++++++++++------ .../Document/UndoStack.cs | 2 +- .../Refactoring/DocumentScript.cs | 2 +- 3 files changed, 63 insertions(+), 28 deletions(-) diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/EditorScript.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/EditorScript.cs index 1e22a1af6b..3948f72f10 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/EditorScript.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/EditorScript.cs @@ -114,35 +114,44 @@ namespace CSharpBinding.Refactoring } break; } - operationsRunning++; InsertWithCursorOnLayer(this, layer, tcs, nodes, editor.Document); return tcs.Task; } void InsertWithCursorOnLayer(EditorScript currentScript, InsertionCursorLayer layer, TaskCompletionSource