File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -862,17 +862,17 @@ let rec parse_event ?(escape_time = 0.1) stream =
862862 | "[M" -> begin
863863 (* Mouse report *)
864864 let open LTerm_mouse in
865- Lwt_stream. next stream > |= Char. code >> = fun mask ->
866- Lwt_stream. next stream > |= Char. code >> = fun x ->
867- Lwt_stream. next stream > |= Char. code >> = fun y ->
865+ Lwt_stream. next stream > |= Char. code > |= (( + )( - 32 )) > >= fun mask ->
866+ Lwt_stream. next stream > |= Char. code > |= (( + )( - 32 )) > >= fun x ->
867+ Lwt_stream. next stream > |= Char. code > |= (( + )( - 32 )) > >= fun y ->
868868 try
869869 if mask = 0b00100011 then raise Exit ;
870870 return (LTerm_event. Mouse {
871871 control = mask land 0b00010000 <> 0 ;
872872 meta = mask land 0b00001000 <> 0 ;
873- shift = false ;
874- row = y - 33 ;
875- col = x - 33 ;
873+ shift = mask land 0b00000100 <> 0 ;
874+ row = y - 1 ;
875+ col = x - 1 ;
876876 button =
877877 (match mask land 0b11000111 with
878878 | 0b00000000 -> Button1
You can’t perform that action at this time.
0 commit comments