From 055fda579c6f994368a0bb352ccf817409154f09 Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Tue, 23 Apr 2019 17:18:01 -0400 Subject: [PATCH] Update workspace.lua --- workspace.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/workspace.lua b/workspace.lua index e70dbe7..3391a57 100644 --- a/workspace.lua +++ b/workspace.lua @@ -67,8 +67,10 @@ local drawWorkspaceIndicator = function(terminal) if instances[y][x] then if focus[1] == x and focus[2] == y then term.blit(" ", "8", "8") - else + elseif instances[y][x].active then term.blit(" ", "7", "7") + else + term.blit(" ", "f", "f") end else term.blit(" ", "0", "0") @@ -574,6 +576,7 @@ local newInstance = function(x, y, program, initialStart) instances[y][x] = { x = x, y = y, + active = initialStart, co = coroutine.create(function() term.redirect(window.handle) local evt @@ -587,6 +590,7 @@ local newInstance = function(x, y, program, initialStart) end end + instances[y][x].active = false term.clear() term.setCursorBlink(false) cwrite("This workspace is inactive.", 0 + scr_y / 2) @@ -604,6 +608,8 @@ local newInstance = function(x, y, program, initialStart) term.clear() term.setCursorBlink(true) + instances[y][x].active = true + if not initialStart then if not program or type(program) == "string" then shell.run(program or defaultProgram)