on master help sign in
Mouse: also correct offsets on mouse-up events
commitdbb3f2a6f4ca0d20a40f22e0aedf6e4aaf6b0687 authorJonathan Daugherty <cygnus@foobox.com> dateSun 23 Oct 2016, 19:48 (10 years ago) parentde55ddf
1 file changed+2−2
src/Graphics/Vty/Input/Mouse.hs+2−2
src/Graphics/Vty/Input/Mouse.hs+2−2
@@ -130,7 +130,7 @@ classifyNormalMouseEvent = do
130130 True -> do
131131 button <- getSGRButton status
132132 return $ EvMouseDown (xCoord-1) (yCoord-1) button modifiers
133− False -> return $ EvMouseUp xCoord yCoord Nothing
133+ False -> return $ EvMouseUp (xCoord-1) (yCoord-1) Nothing
134134
135135-- Attempt to classify a control sequence as an SGR mouse event. To
136136-- get here we should have already read "\ESC[<" so that will not be
@@ -148,5 +148,5 @@ classifySGRMouseEvent = do
148148 button <- getSGRButton mods
149149 case final of
150150 'M' -> return $ EvMouseDown (xCoord-1) (yCoord-1) button modifiers
151− 'm' -> return $ EvMouseUp xCoord yCoord (Just button)
151+ 'm' -> return $ EvMouseUp (xCoord-1) (yCoord-1) (Just button)
152152 _ -> failParse