aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-08-31 19:18:19 +0200
committerAdrian Kummerlaender2015-08-31 19:18:19 +0200
commit49edb32662e20c284e4a0a1a5b248eb65f2b42b6 (patch)
treead2fd2f22e53d6f7b24cd451258da5ab631555be /src
parente5a3db8f6207e6e232a05f55a6a436a0c9f92882 (diff)
downloadMetaTerm-49edb32662e20c284e4a0a1a5b248eb65f2b42b6.tar
MetaTerm-49edb32662e20c284e4a0a1a5b248eb65f2b42b6.tar.gz
MetaTerm-49edb32662e20c284e4a0a1a5b248eb65f2b42b6.tar.bz2
MetaTerm-49edb32662e20c284e4a0a1a5b248eb65f2b42b6.tar.lz
MetaTerm-49edb32662e20c284e4a0a1a5b248eb65f2b42b6.tar.xz
MetaTerm-49edb32662e20c284e4a0a1a5b248eb65f2b42b6.tar.zst
MetaTerm-49edb32662e20c284e4a0a1a5b248eb65f2b42b6.zip
Adapt focus and input scoping to respect history viewer
Diffstat (limited to 'src')
-rw-r--r--src/list/TerminalItem.qml19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/list/TerminalItem.qml b/src/list/TerminalItem.qml
index 9a1b758..7de2b48 100644
--- a/src/list/TerminalItem.qml
+++ b/src/list/TerminalItem.qml
@@ -38,6 +38,7 @@ Item {
scope.forceActiveFocus();
if ( terminal === null ) {
+ command.readOnly = false;
highlighter.select();
highlighter.focus();
}
@@ -45,6 +46,7 @@ Item {
function unfocus() {
if ( terminal === null ) {
+ command.readOnly = true;
highlighter.unfocus();
}
}
@@ -68,14 +70,15 @@ Item {
function reset() {
if ( terminal !== null ) {
terminal.destroy();
-
- terminal = null;
- command.readOnly = false;
- command.focus = true;
-
- mode.enterNormalMode();
- unfocus();
+ terminal = null;
+ } else if ( history !== null ) {
+ history.destroy();
+ history = null;
}
+
+ command.focus = true;
+ mode.enterNormalMode();
+ unfocus();
}
FocusScope {
@@ -172,7 +175,7 @@ Item {
Layout.fillWidth: true
onAccepted: {
- if ( item.terminal === null ) {
+ if ( !readOnly ) {
readOnly = true;
focus = false;