aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-08-13 21:01:54 +0200
committerAdrian Kummerlaender2015-08-13 21:01:54 +0200
commit51e69178618944d3454e76b0a7de747435be57a0 (patch)
treee31caf1b3c589a4ed39425c0cbb4b9b7741b02d1 /qml
parent358d64b332068103b24577bbf4c390b05dbe50df (diff)
downloadMetaTerm-51e69178618944d3454e76b0a7de747435be57a0.tar
MetaTerm-51e69178618944d3454e76b0a7de747435be57a0.tar.gz
MetaTerm-51e69178618944d3454e76b0a7de747435be57a0.tar.bz2
MetaTerm-51e69178618944d3454e76b0a7de747435be57a0.tar.lz
MetaTerm-51e69178618944d3454e76b0a7de747435be57a0.tar.xz
MetaTerm-51e69178618944d3454e76b0a7de747435be57a0.tar.zst
MetaTerm-51e69178618944d3454e76b0a7de747435be57a0.zip
Implement `kill` command
Diffstat (limited to 'qml')
-rw-r--r--qml/StateHandler.qml5
-rw-r--r--qml/TerminalItem.qml1
-rw-r--r--qml/TerminalList.qml4
-rw-r--r--qml/commands.js6
4 files changed, 12 insertions, 4 deletions
diff --git a/qml/StateHandler.qml b/qml/StateHandler.qml
index 04215df..d9f5f5a 100644
--- a/qml/StateHandler.qml
+++ b/qml/StateHandler.qml
@@ -150,6 +150,9 @@ Item {
Action {
id: resetTerminalAction
shortcut: settings.resetItem
- onTriggered: terminalList.getCurrent().reset()
+ onTriggered: {
+ terminalList.getCurrent().reset();
+ terminalList.getCurrent().select();
+ }
}
}
diff --git a/qml/TerminalItem.qml b/qml/TerminalItem.qml
index fc7bbf7..57197bd 100644
--- a/qml/TerminalItem.qml
+++ b/qml/TerminalItem.qml
@@ -84,7 +84,6 @@ Item {
command.focus = true;
unfocus();
- select();
}
}
diff --git a/qml/TerminalList.qml b/qml/TerminalList.qml
index 013b394..6c6465b 100644
--- a/qml/TerminalList.qml
+++ b/qml/TerminalList.qml
@@ -89,6 +89,10 @@ Item {
return children[activeItem];
}
+ function get(index) {
+ return children[index];
+ }
+
function iterate(func) {
for ( var i = 0; i < children.length; i++ ) {
func(children[i]);
diff --git a/qml/commands.js b/qml/commands.js
index 7069458..23f0a7f 100644
--- a/qml/commands.js
+++ b/qml/commands.js
@@ -23,8 +23,6 @@ function exec(output, args) {
if ( typeof result !== 'undefined' ) {
output.log(result);
- } else {
- output.log('');
}
}
@@ -32,6 +30,10 @@ function jump(output, index) {
terminalList.selectItem(index);
}
+function kill(output, index) {
+ terminalList.get(index).reset();
+}
+
function next() {
terminalList.selectNext();
}