diff --git a/python/src/com/jetbrains/python/console/PythonConsoleView.java b/python/src/com/jetbrains/python/console/PythonConsoleView.java index b43e7386f68f..a038db0594bc 100644 --- a/python/src/com/jetbrains/python/console/PythonConsoleView.java +++ b/python/src/com/jetbrains/python/console/PythonConsoleView.java @@ -263,15 +263,15 @@ public class PythonConsoleView extends LanguageConsoleImpl implements Observable new TextRange(0, psiFile .getTextLength()))); } - }); - int oldOffset = getConsoleEditor().getCaretModel().getOffset(); - getConsoleEditor().getCaretModel().moveToOffset(document.getTextLength()); - myExecuteActionHandler.runExecuteAction(this); + int oldOffset = getConsoleEditor().getCaretModel().getOffset(); + getConsoleEditor().getCaretModel().moveToOffset(document.getTextLength()); + myExecuteActionHandler.runExecuteAction(this); - if (!StringUtil.isEmpty(oldText)) { - ApplicationManager.getApplication().runWriteAction(() -> setInputText(oldText)); - getConsoleEditor().getCaretModel().moveToOffset(oldOffset); - } + if (!StringUtil.isEmpty(oldText)) { + ApplicationManager.getApplication().runWriteAction(() -> setInputText(oldText)); + getConsoleEditor().getCaretModel().moveToOffset(oldOffset); + } + }); }); } diff --git a/python/testSrc/com/jetbrains/env/python/PythonDebuggerTest.java b/python/testSrc/com/jetbrains/env/python/PythonDebuggerTest.java index 62418900eadc..5b05fbb51e2f 100644 --- a/python/testSrc/com/jetbrains/env/python/PythonDebuggerTest.java +++ b/python/testSrc/com/jetbrains/env/python/PythonDebuggerTest.java @@ -81,7 +81,7 @@ public class PythonDebuggerTest extends PyEnvTestCase { @Test @Staging public void testPydevTests_Debugger() { - unittests("tests_pydevd_python/test_debugger.py", null, true); + unittests("tests_pydevd_python/test_debugger.py", ImmutableSet.of("-iron"), true); } @Test