Browse Source

fix bug in EditorScript.InsertWithCursor when executing a nested script in a different file, the "root" script was not properly disposed after the nested script finished.

pull/315/head
Siegfried Pammer 12 years ago
parent
commit
cb631e64e1
  1. 4
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/EditorScript.cs

4
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/EditorScript.cs

@ -119,7 +119,7 @@ namespace CSharpBinding.Refactoring
return tcs.Task; return tcs.Task;
} }
static void InsertWithCursorOnLayer(EditorScript currentScript, InsertionCursorLayer layer, TaskCompletionSource<Script> tcs, IList<AstNode> nodes, IDocument target) void InsertWithCursorOnLayer(EditorScript currentScript, InsertionCursorLayer layer, TaskCompletionSource<Script> tcs, IList<AstNode> nodes, IDocument target)
{ {
layer.Exited += delegate(object s, InsertionCursorEventArgs args) { layer.Exited += delegate(object s, InsertionCursorEventArgs args) {
if (args.Success) { if (args.Success) {
@ -137,7 +137,7 @@ namespace CSharpBinding.Refactoring
tcs.SetResult(currentScript); tcs.SetResult(currentScript);
} }
layer.Dispose(); layer.Dispose();
currentScript.DisposeOnClose(); DisposeOnClose();
}; };
} }

Loading…
Cancel
Save