From aa2e6b471bec406f5794b5e9ae0e2a09d7d66bc1 Mon Sep 17 00:00:00 2001 From: sawka Date: Tue, 11 Oct 2022 23:13:34 -0700 Subject: [PATCH] small updates for cmd-fg --- src/main.tsx | 3 ++- src/model.ts | 16 +++++++--------- src/sh2.less | 5 +++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/main.tsx b/src/main.tsx index 3e8e5eec..a1161cca 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -337,10 +337,11 @@ class LineCmd extends React.Component<{sw : ScreenWindow, line : LineType, width let isPhysicalFocused = sw.getIsFocused(line.linenum); let swFocusType = sw.focusType.get(); let isFocused = isPhysicalFocused && (swFocusType == "cmd" || swFocusType == "cmd-fg"); + let isFgFocused = isPhysicalFocused && swFocusType == "cmd-fg"; let isStatic = staticRender; return (
-
+
{lineNumStr} diff --git a/src/model.ts b/src/model.ts index 7cf24a50..1d3f8731 100644 --- a/src/model.ts +++ b/src/model.ts @@ -1561,17 +1561,15 @@ class Model { } cmdStatusUpdate(sessionId : string, cmdId : string, origStatus : string, newStatus : string) { - // TODO force recompute usedrows in terminal when status changes to done console.log("cmd status", sessionId, cmdId, origStatus, "=>", newStatus); - let sw = this.getActiveSW(); - if (sw == null || sw.sessionId != sessionId) { - return; + let lines = this.getActiveLinesByCmdId(sessionId, cmdId); + for (let ptr of lines) { + let sw = ptr.sw; + let term = sw.getTermWrap(cmdId); + if (term != null) { + setTimeout(() => term.updateUsedRows(true), 500); + } } - let term = sw.terms[cmdId]; - if (term == null) { - return; - } - setTimeout(() => term.updateUsedRows(true), 500); } onMetaPageUp() : void { diff --git a/src/sh2.less b/src/sh2.less index 597f8c78..49f1cae7 100644 --- a/src/sh2.less +++ b/src/sh2.less @@ -483,6 +483,11 @@ html, body, #main { display: block; background-color: @tab-blue; } + + &.active.selected.fg-focus { + display: block; + background-color: @tab-green; + } } .avatar {