Allow terminals to block input

This commit is contained in:
2022-06-07 22:56:20 +01:00
parent e85bd36fe4
commit c31f398fab
8 changed files with 48 additions and 27 deletions
+5 -4
View File
@@ -120,10 +120,11 @@ accessTerminal mtmid w = case mtmid of
& terminals . ix tmid %~ tryToBoot
where
tryToBoot tm = case _tmStatus tm of
Connected -> tm
Disconnected -> tm
& tmFutureLines ++.~ _tmProgram tm tm w
& tmStatus .~ Connected
TerminalReady -> tm
TerminalBusy -> tm
TerminalOff -> tm
& tmFutureLines .~ _tmProgram tm tm w
& tmStatus .~ TerminalBusy
simpleTermMessage :: [String] -> Terminal
simpleTermMessage strs = defaultTerminal & tmFutureLines .~ map makeTermLine strs