diff --git a/src/InteractiveWindow/Editor/InteractiveWindow_UIThread.cs b/src/InteractiveWindow/Editor/InteractiveWindow_UIThread.cs index 48c29cc94966af1891ceabf33327d05f9d0e1f5a..19dea41af25ab248ed06a3fd4a1f664fba3786a4 100644 --- a/src/InteractiveWindow/Editor/InteractiveWindow_UIThread.cs +++ b/src/InteractiveWindow/Editor/InteractiveWindow_UIThread.cs @@ -277,7 +277,7 @@ private void CancelStandardInput() public void InsertCode(string text) { - if (_window._stdInputStart == null) + if (_window._stdInputStart != null) { return; } diff --git a/src/InteractiveWindow/EditorTest/InteractiveWindowTests.cs b/src/InteractiveWindow/EditorTest/InteractiveWindowTests.cs index f35b8d4aa489c4d673852c66afeba7c3d775cd5d..edc507fa93c6c7c031f22640a0b09301503aa4d9 100644 --- a/src/InteractiveWindow/EditorTest/InteractiveWindowTests.cs +++ b/src/InteractiveWindow/EditorTest/InteractiveWindowTests.cs @@ -288,7 +288,7 @@ public void CallReadStandardInputOnUIThread() [Fact] public void CallBackspaceOnNonUIThread() { - Window.Operations.BreakLine(); // Something to backspace. + Window.InsertCode("1"); // Something to backspace. Task.Run(() => Window.Operations.Backspace()).PumpingWait(); } @@ -308,7 +308,7 @@ public void CallClearHistoryOnNonUIThread() [Fact] public void CallClearViewOnNonUIThread() { - Window.Operations.BreakLine(); // Something to clear. + Window.InsertCode("1"); // Something to clear. Task.Run(() => Window.Operations.ClearView()).PumpingWait(); } @@ -357,7 +357,7 @@ public void CallEndOnNonUIThread() [Fact] public void CallSelectAllOnNonUIThread() { - Window.Operations.BreakLine(); // Something to select. + Window.InsertCode("1"); // Something to select. Task.Run(() => Window.Operations.SelectAll()).PumpingWait(); }