Partial rethink of terminal text input

This commit is contained in:
2025-08-14 21:48:02 +01:00
parent 5b720cb82c
commit 91d19e7c42
12 changed files with 142 additions and 167 deletions
+2 -7
View File
@@ -57,7 +57,7 @@ accessTerminal mtmid w = fromMaybe w $ do
& cWorld . lWorld . terminals . ix tmid %~ tryToBoot
where
tryToBoot tm = case _tmStatus tm of
TerminalReady -> tm
TerminalTextInput {} -> tm
TerminalBusy -> tm
TerminalOff ->
tm
@@ -76,7 +76,7 @@ lineOutputTerminal tls =
defaultTerminal
{ _tmDisplayedLines = []
, _tmFutureLines = []
, _tmTitle = "TERMINAL"
-- , _tmTitle = "TERMINAL"
, _tmScrollCommands = [quitCommand]
, _tmWriteCommands = [helpCommand, commandsCommand]
, _tmBootLines = connectionBlurbLines tls
@@ -91,11 +91,6 @@ doDeathTriggers tm = cWorld . lWorld . triggers %~ flip (foldl' $ flip doDeathTo
doDeathToggle :: TerminalToggle -> IM.IntMap Bool -> IM.IntMap Bool
doDeathToggle (TerminalToggle trid f) = ix trid %~ doBlBl f
--doTerminalBootProgram :: TerminalBootProgram -> Terminal -> World -> [TerminalLine]
--doTerminalBootProgram tbp = case tbp of
-- TerminalBootMempty -> \_ _ -> []
-- TerminalBootLines ls -> \_ _ -> ls
doTmWdWd :: TmWdWd -> Terminal -> World -> World
doTmWdWd tmwdwd = case tmwdwd of
TmWdId -> const id