kh: implement null check correctly

This commit is contained in:
fang 2021-06-17 20:30:20 +02:00
parent ddf579bd75
commit b3964c97a6
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -113,8 +113,8 @@ drawState :: St -> [Ev]
drawState St{..} = hist <> out <> cur <> spin
where
hist = drawHistory <$> toList sHistory
out | null <- sLine = []
| otherwise = [EvEdit sLine]
out | null sLine = []
| otherwise = [EvEdit sLine]
cur | (0, _) <- sCurPos = []
| otherwise = [EvMove sCurPos]
spin = maybe [] (singleton . EvSpin . Just) sSpinner