@@ -471,6 +471,7 @@ wrapInputState maxWidth attrs cursorAttrs (InputState before after) =
471471 Nothing -> (top', midB, ' ', "", bottom')
472472 Just (c, rest) -> (top', midB, c, rest, bottom')
473473 wrappedTop = wrap top
474+ wrappedBottom = wrap bottom
474475 (midBeforeTop, midBefore') = fromMaybe ([], "") $ initLast $ wrap [midBefore]
475476 cursorAfterEOL = T.length midBefore' == maxWidth
476477 (midAfter', midAfterBottom) =
@@ -498,7 +499,7 @@ wrapInputState maxWidth attrs cursorAttrs (InputState before after) =
498499 ]
499500 ]
500501 , vstring <$> midAfterBottom
501− , vstring <$> bottom
502+ , vstring <$> wrappedBottom
502503 ]
503504 cursorY = length wrappedTop + length midBeforeTop + if cursorAfterEOL then 1 else 0
504505 in (images, cursorY)