@@ -471,6 +471,7 @@ wrapInputState maxWidth attrs cursorAttrs (InputState before after) =
471 Nothing -> (top', midB, ' ', "", bottom')
471 Nothing -> (top', midB, ' ', "", bottom')
472 Just (c, rest) -> (top', midB, c, rest, bottom')
472 Just (c, rest) -> (top', midB, c, rest, bottom')
473 wrappedTop = wrap top
473 wrappedTop = wrap top
474+ wrappedBottom = wrap bottom
474 (midBeforeTop, midBefore') = fromMaybe ([], "") $ initLast $ wrap [midBefore]
475 (midBeforeTop, midBefore') = fromMaybe ([], "") $ initLast $ wrap [midBefore]
475 cursorAfterEOL = T.length midBefore' == maxWidth
476 cursorAfterEOL = T.length midBefore' == maxWidth
476 (midAfter', midAfterBottom) =
477 (midAfter', midAfterBottom) =
@@ -498,7 +499,7 @@ wrapInputState maxWidth attrs cursorAttrs (InputState before after) =
500 , vstring <$> midAfterBottom
501 , vstring <$> midAfterBottom
501− , vstring <$> bottom
502+ , vstring <$> wrappedBottom
503 cursorY = length wrappedTop + length midBeforeTop + if cursorAfterEOL then 1 else 0
504 cursorY = length wrappedTop + length midBeforeTop + if cursorAfterEOL then 1 else 0
504 in (images, cursorY)
505 in (images, cursorY)