##// END OF EJS Templates
qtconsole: strip newline on text copy (fixes #6234)...
Boris Egorov -
Show More
@@ -215,7 +215,10 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):'
215 elif self._control.hasFocus():
215 elif self._control.hasFocus():
216 text = self._control.textCursor().selection().toPlainText()
216 text = self._control.textCursor().selection().toPlainText()
217 if text:
217 if text:
218 was_newline = text[-1] == '\n'
218 text = self._prompt_transformer.transform_cell(text)
219 text = self._prompt_transformer.transform_cell(text)
220 if not was_newline: # user don't need newline
221 text = text[:-1]
219 QtGui.QApplication.clipboard().setText(text)
222 QtGui.QApplication.clipboard().setText(text)
220 else:
223 else:
221 self.log.debug("frontend widget : unknown copy target")
224 self.log.debug("frontend widget : unknown copy target")
General Comments 0
You need to be logged in to leave comments. Login now