outputPicture: clamp invalid cursor positions when Cursor is used (fixes #140)
commitf2be6a0e20338107815b693bbfcf511373e52d10
authorJonathan Daugherty <cygnus@foobox.com>
dateThu 18 Jan 2018, 20:18 (9 years ago)
parent9ae2df4
src/Graphics/Vty/Output/Interface.hs+1−1
@@ -194,7 +194,7 @@ outputPicture dc pic = liftIO $ do
194194 writeMoveCursor dc (clampX x) (clampY y)
195195 Cursor x y ->
196196 let m = cursorOutputMap ops $ picCursor pic
197− (ox, oy) = charToOutputPos m (x,y)
197+ (ox, oy) = charToOutputPos m (clampX x, clampY y)
198198 in writeShowCursor dc `mappend`
199199 writeMoveCursor dc (clampX ox) (clampY oy)
200200 )