This commit is contained in:
2022-06-06 16:37:52 +01:00
parent ce323630ee
commit 4e181b8273
8 changed files with 23 additions and 30 deletions
+3 -4
View File
@@ -73,7 +73,7 @@ getCommands tm w = do
infoClearInput :: Terminal -> [TerminalLine] -> World -> World
infoClearInput tm tls = terminals . ix (_tmID tm) %~
( (tmInput ?~ TerminalInput T.empty True)
( (tmInput ?~ TerminalInput T.empty True (0,0))
. (tmFutureLines ++.~ tls
)
)
@@ -156,7 +156,7 @@ doTerminalEffect' s tm w = fromMaybe (w & badinput) $ do
case _tcEffect command args tm w of
Right w' -> return w'
Left err -> return $ w & terminals . ix (_tmID tm) %~
( (tmInput ?~ TerminalInput T.empty True)
( (tmInput ?~ TerminalInput T.empty True (0,0))
. (tmFutureLines ++.~
[makeColorTermLine red
("^ INVALID ARGUMENT: EXPECTS "++fromJust (_tcArgumentType command)++ err)
@@ -165,7 +165,7 @@ doTerminalEffect' s tm w = fromMaybe (w & badinput) $ do
)
where
badinput = terminals . ix (_tmID tm) %~
( (tmInput ?~ TerminalInput T.empty True)
( (tmInput ?~ TerminalInput T.empty True (0,0))
. (tmFutureLines ++.~ [makeColorTermLine red "^ INVALID INPUT" ]
)
)
@@ -187,7 +187,6 @@ defaultTermParams = defaultTerminal
,_tmFutureLines = []
,_tmMaxLines = 14
,_tmTitle = "TERMINAL"
,_tmSel = Nothing
,_tmInput = Nothing
,_tmScrollCommands = []
,_tmWriteCommands = []