on master help sign in
Cursor may be NoCursor

Ignore-this: f650d4ebd1dd758b9e0e248fe3d16ae7 darcs-hash:20100601051536-ffa78-9d93f01e09f044bff4131c02bc38e18ce5fed8a6.gz

commit870ab1e9190002762b794eaef9f9ea847306d963 authorYoshikuni Jujo <PAF01143@nifty.ne.jp> dateMon 31 May 2010, 22:15 (16 years ago) parentbd6a360
1 file changed+14−10
src/Graphics/Vty.hs+14−10
src/Graphics/Vty.hs+14−10
@@ -93,16 +93,20 @@ intMkVty kvar fend t = do
9393 let inner_update in_pic = do
9494 b <- display_bounds t
9595 let DisplayRegion w h = b
96− Cursor x y = pic_cursor in_pic
97− x' = case x of
98− _ | x >= 0x80000000 -> 0
99− | x >= w -> w - 1
100− | otherwise -> x
101− y' = case y of
102− _ | y >= 0x80000000 -> 0
103− | y >= h -> h - 1
104− | otherwise -> y
105− in_pic' = in_pic { pic_cursor = Cursor x' y' }
96+ cursor = pic_cursor in_pic
97+ in_pic' = case cursor of
98+ Cursor x y ->
99+ let
100+ x' = case x of
101+ _ | x >= 0x80000000 -> 0
102+ | x >= w -> w - 1
103+ | otherwise -> x
104+ y' = case y of
105+ _ | y >= 0x80000000 -> 0
106+ | y >= h -> h - 1
107+ | otherwise -> y
108+ in in_pic { pic_cursor = Cursor x' y' }
109+ _ -> in_pic
106110 mlast_update <- readIORef last_update_ref
107111 update_data <- case mlast_update of
108112 Nothing -> do