From ddc94197aa6888e7d32846fd10479ec660125780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Verret?= Date: Fri, 18 Sep 2020 12:30:43 -0400 Subject: [PATCH] Keep console input when switching server (#6607) Console input was being replaced by an empty line every time the server used changed. --- electrum/gui/qt/console.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qt/console.py b/electrum/gui/qt/console.py index 1158134fb..a6713100e 100644 --- a/electrum/gui/qt/console.py +++ b/electrum/gui/qt/console.py @@ -86,8 +86,9 @@ class Console(QtWidgets.QPlainTextEdit): self.namespace.update(namespace) def showMessage(self, message): + curr_line = self.getCommand() self.appendPlainText(message) - self.newPrompt('') + self.newPrompt(curr_line) def clear(self): curr_line = self.getCommand() @@ -96,7 +97,7 @@ class Console(QtWidgets.QPlainTextEdit): def newPrompt(self, curr_line): if self.construct: - prompt = '... ' + prompt = '... ' + curr_line else: prompt = self.prompt + curr_line