diff --git a/colourterm/mainwindow.py b/colourterm/mainwindow.py index 4ba7cc1..64a76c3 100644 --- a/colourterm/mainwindow.py +++ b/colourterm/mainwindow.py @@ -271,6 +271,9 @@ class MainWindow(QtGui.QMainWindow, UiMainWindow): #else: self.updateOutput.emit(output.strip('\r\n')) output = '' + elif output.endswith('\n'): + self.updateOutput.emit(output.strip('\n')) + output = '' def on_open_action_triggered(self): self.connect_dialog.update_port_combobox() @@ -369,6 +372,12 @@ class MainWindow(QtGui.QMainWindow, UiMainWindow): self.find_combobox.currentText(), QtWebKit.QWebPage.HighlightAllOccurrences | QtWebKit.QWebPage.FindWrapsAroundDocument ) + elif key == QtCore.Qt.Key_Escape: + if not self.find_combobox.currentText() and self.find_widget.isVisible(): + self.find_action.setChecked(not self.find_action.isChecked()) + else: + self.find_combobox.clearEditText() + self.output_browser.findText("") def on_send_combobox_key_pressed(self, key): if key == QtCore.Qt.Key_Return or key == QtCore.Qt.Key_Enter: