From 6b2b5ee4ff692804831c55cb186f155c99a29a3e Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Fri, 18 Mar 2011 17:46:24 +0300 Subject: [PATCH] put caret to the end of the history entry --- .../execution/runners/AbstractConsoleRunnerWithHistory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/execution/runners/AbstractConsoleRunnerWithHistory.java b/platform/lang-impl/src/com/intellij/execution/runners/AbstractConsoleRunnerWithHistory.java index 8a55c94dd1f9..7ac9881f335a 100644 --- a/platform/lang-impl/src/com/intellij/execution/runners/AbstractConsoleRunnerWithHistory.java +++ b/platform/lang-impl/src/com/intellij/execution/runners/AbstractConsoleRunnerWithHistory.java @@ -281,7 +281,9 @@ public abstract class AbstractConsoleRunnerWithHistory { public boolean process(final AnActionEvent e, final String s) { new WriteCommandAction(languageConsole.getProject(), languageConsole.getFile()) { protected void run(final Result result) throws Throwable { - languageConsole.getEditorDocument().setText(s == null ? "" : s); + String text = s == null ? "" : s; + languageConsole.getEditorDocument().setText(text); + languageConsole.getConsoleEditor().getCaretModel().moveToOffset(text.length()); } }.execute(); return true;