From 8a41deb8707dd5d19abf4e4eda15f8a32700ffb1 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 30 Aug 2015 13:03:14 +0200 Subject: 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. --- src/list/TerminalItem.qml | 8 +++++--- 1 file 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(); }); } -- cgit v1.2.3