From 9e35f1f8ac0ad92cbf4b5b620cc2e1aaa1a99261 Mon Sep 17 00:00:00 2001 From: Benoit Verret Date: Wed, 2 Sep 2020 07:40:18 -0400 Subject: [PATCH] Fix handling of constructs in console - Replace "...." by "... " in multiline constructs. - Execute constructs after one empty line and not two or three. It was more or less random before. --- electrum/gui/qt/console.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/electrum/gui/qt/console.py b/electrum/gui/qt/console.py index ee627cf28..babb05cdb 100644 --- a/electrum/gui/qt/console.py +++ b/electrum/gui/qt/console.py @@ -99,7 +99,7 @@ class Console(QtWidgets.QPlainTextEdit): def newPrompt(self, curr_line): if self.construct: - prompt = '.' * len(self.prompt) + prompt = '... ' else: prompt = self.prompt + curr_line @@ -160,9 +160,8 @@ class Console(QtWidgets.QPlainTextEdit): def getConstruct(self, command): if self.construct: - prev_command = self.construct[-1] self.construct.append(command) - if not prev_command and not command: + if not command: ret_val = '\n'.join(self.construct) self.construct = [] return ret_val