Cleanup
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user