diff options
Diffstat (limited to 'src/list')
-rw-r--r-- | src/list/TerminalItem.qml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/list/TerminalItem.qml b/src/list/TerminalItem.qml index 7dd0350..2eb9dc7 100644 --- a/src/list/TerminalItem.qml +++ b/src/list/TerminalItem.qml @@ -81,6 +81,14 @@ Item { unfocus(); } + function terminate() { + if ( terminal !== null ) { + terminal.terminate(); + } else { + throw "No process to terminate."; + } + } + FocusScope { id: scope @@ -114,7 +122,10 @@ Item { item.terminal.onFinished.connect(function() { createHistoryViewer(item.terminal.history); item.reset(); - item.select(); + + if ( item.index === terminalList.activeItem ) { + item.select(); + } if ( item.index === ( terminalList.children.length - 2 ) ) { terminalList.selectNext(); |