aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-08-30 13:03:14 +0200
committerAdrian Kummerlaender2015-08-30 13:03:14 +0200
commit8a41deb8707dd5d19abf4e4eda15f8a32700ffb1 (patch)
treee49de4ecb2c56cebc20f8674063d72b99ee24448
parent0dd49584e26c294e3fb25347969f61bca84afb5f (diff)
downloadMetaTerm-8a41deb8707dd5d19abf4e4eda15f8a32700ffb1.tar
MetaTerm-8a41deb8707dd5d19abf4e4eda15f8a32700ffb1.tar.gz
MetaTerm-8a41deb8707dd5d19abf4e4eda15f8a32700ffb1.tar.bz2
MetaTerm-8a41deb8707dd5d19abf4e4eda15f8a32700ffb1.tar.lz
MetaTerm-8a41deb8707dd5d19abf4e4eda15f8a32700ffb1.tar.xz
MetaTerm-8a41deb8707dd5d19abf4e4eda15f8a32700ffb1.tar.zst
MetaTerm-8a41deb8707dd5d19abf4e4eda15f8a32700ffb1.zip
Ease consecutive non-interactive executions and fix mode change
If a non-interactive applications terminates the next item is automatically selected in insert mode as to make the behaviour in this context more simmilar to normal shells. Normal mode has to be entered explicitly for the highlighting to update on `HistoryViewer` instantiation.
-rw-r--r--src/list/TerminalItem.qml8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/list/TerminalItem.qml b/src/list/TerminalItem.qml
index cfffd86..ae6bc77 100644
--- a/src/list/TerminalItem.qml
+++ b/src/list/TerminalItem.qml
@@ -38,7 +38,6 @@ Item {
scope.forceActiveFocus();
if ( terminal === null ) {
- scope.forceActiveFocus();
highlighter.select();
highlighter.focus();
}
@@ -74,6 +73,8 @@ Item {
command.readOnly = false;
command.focus = true;
+ mode.enterNormalMode();
+ select();
unfocus();
}
}
@@ -109,9 +110,10 @@ Item {
"focus" : true
});
item.terminal.onFinished.connect(function() {
- var history = item.terminal.history;
+ createHistoryViewer(item.terminal.history);
item.reset();
- createHistoryViewer(history);
+ terminalList.selectNext();
+ mode.enterInsertMode();
});
}