We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4ac6e9 commit fc7ca17Copy full SHA for fc7ca17
python/console.py
@@ -272,9 +272,12 @@ def insertFromMimeData(self, source):
272
if source.hasText():
273
pasteList = QStringList()
274
pasteList = source.text().split("\n")
275
- for line in pasteList:
276
- self.insertPlainText(line)
277
- self.runCommand(unicode(line))
+ # with multi-line text also run the commands
+ for line in pasteList[:-1]:
+ self.insertPlainText(line)
278
+ self.runCommand(unicode(line))
279
+ # last line: only paste the text, do not run it
280
+ self.insertPlainText(unicode(pasteList[-1]))
281
282
def entered(self):
283
self.cursor.movePosition(QTextCursor.End, QTextCursor.MoveAnchor)
0 commit comments