aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-04-14 13:40:45 -0400
committerKen Moore <moorekou@gmail.com>2016-04-14 13:40:45 -0400
commit33859f365339e3c448085e6a3c5961220108850a (patch)
treef589c804979af6a4998f75b96e8e1696087bd431
parentAdd a start for a Qt text editor (mainly for playing around - but it could tu... (diff)
downloadlumina-33859f365339e3c448085e6a3c5961220108850a.tar.gz
lumina-33859f365339e3c448085e6a3c5961220108850a.tar.bz2
lumina-33859f365339e3c448085e6a3c5961220108850a.zip
Clean up a bit more of the terminal widget/interactions.
-rw-r--r--desktop-utilities/lumina-terminal/TermWindow.cpp5
-rw-r--r--desktop-utilities/lumina-terminal/TerminalWidget.cpp3
2 files changed, 4 insertions, 4 deletions
diff --git a/desktop-utilities/lumina-terminal/TermWindow.cpp b/desktop-utilities/lumina-terminal/TermWindow.cpp
index b79e5fb5..1e82437d 100644
--- a/desktop-utilities/lumina-terminal/TermWindow.cpp
+++ b/desktop-utilities/lumina-terminal/TermWindow.cpp
@@ -216,10 +216,9 @@ void TermWindow::Close_Tab(int tab){
static_cast<TerminalWidget*>(tabWidget->widget(tab))->aboutToClose();
tabWidget->widget(tab)->deleteLater(); //delete the page within the tag
tabWidget->removeTab(tab); // remove the tab itself
- //Make sure there is always at least one tab
+ //Let the tray know when the last terminal is closed
if(tabWidget->count() < 1){
- if(CLOSING){ emit TerminalFinished(); }
- else{ New_Tab(); }
+ emit TerminalFinished();
}
}
diff --git a/desktop-utilities/lumina-terminal/TerminalWidget.cpp b/desktop-utilities/lumina-terminal/TerminalWidget.cpp
index 0faa45ff..14f5dc91 100644
--- a/desktop-utilities/lumina-terminal/TerminalWidget.cpp
+++ b/desktop-utilities/lumina-terminal/TerminalWidget.cpp
@@ -413,10 +413,11 @@ void TerminalWidget::keyPressEvent(QKeyEvent *ev){
if(ev->text().isEmpty() || ev->text()=="\b" ){
sendKeyPress(ev->key());
}else{
- if(ev->key()==Qt::Key_Enter || ev->key()==Qt::Key_Return){
+ if( (ev->key()==Qt::Key_Enter || ev->key()==Qt::Key_Return) && !this->textCursor().atEnd() ){
sendKeyPress(Qt::Key_End); //just in case the cursor is not at the end (TTY will split lines and such - ugly)
}
QByteArray ba; ba.append(ev->text()); //avoid any byte conversions
+ //qDebug() << "Forward Input:" << ba;
PROC->writeTTY(ba);
}
bgstack15