From 2ee2756b5c07448a7f6d3fb3bc6d89268d5bbaf6 Mon Sep 17 00:00:00 2001 From: Elizaveta Shashkova Date: Tue, 9 Jun 2020 22:33:28 +0300 Subject: [PATCH] PY-28654 Soft-wrap works in Debug Console only after manual enabling Signed-off-by: Elizaveta Shashkova GitOrigin-RevId: da248c30797dae19c085253a45a42e2977fdf4aa --- .../python/console/PythonDebugLanguageConsoleView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/src/com/jetbrains/python/console/PythonDebugLanguageConsoleView.java b/python/src/com/jetbrains/python/console/PythonDebugLanguageConsoleView.java index 1188863c02ab..178a54249dfc 100644 --- a/python/src/com/jetbrains/python/console/PythonDebugLanguageConsoleView.java +++ b/python/src/com/jetbrains/python/console/PythonDebugLanguageConsoleView.java @@ -9,6 +9,8 @@ import com.intellij.execution.runners.AbstractConsoleRunnerWithHistory; import com.intellij.execution.ui.ConsoleView; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.editor.Editor; +import com.intellij.openapi.editor.ex.EditorSettingsExternalizable; +import com.intellij.openapi.editor.impl.softwrap.SoftWrapAppliancePlaces; import com.intellij.openapi.project.Project; import com.intellij.openapi.projectRoots.Sdk; import com.intellij.openapi.wm.IdeFocusManager; @@ -39,6 +41,8 @@ public class PythonDebugLanguageConsoleView extends DuplexConsoleView actions = ContainerUtil.newArrayList(PyConsoleUtil.createTabCompletionAction(getPydevConsoleView())); actions.add(PyConsoleUtil.createInterruptAction(getPydevConsoleView())); AbstractConsoleRunnerWithHistory.registerActionShortcuts(actions, getPydevConsoleView().getEditor().getComponent()); + boolean isUseSoftWraps = EditorSettingsExternalizable.getInstance().isUseSoftWraps(SoftWrapAppliancePlaces.CONSOLE); + getPydevConsoleView().getEditor().getSettings().setUseSoftWraps(isUseSoftWraps); } public PythonDebugLanguageConsoleView(final Project project, Sdk sdk) {