Commit 5e336e10 authored by IGI-111's avatar IGI-111 Committed by ticki

add support for xterm mouse release code (#97)

Codes of the form `ESC [ < 3 ; Cx ; Cy` were not supported before.
parent 11a0ee17
......@@ -182,7 +182,7 @@ fn parse_csi<I>(iter: &mut I) -> Option<Event>
}
Some(Ok(b'<')) => {
// xterm mouse encoding:
// ESC [ < Cb ; Cx ; Cy ; (M or m)
// ESC [ < Cb ; Cx ; Cy (;) (M or m)
let mut buf = Vec::new();
let mut c = iter.next().unwrap().unwrap();
while match c {
......@@ -216,6 +216,7 @@ fn parse_csi<I>(iter: &mut I) -> Option<Event>
}
}
32 => MouseEvent::Hold(cx, cy),
3 => MouseEvent::Release(cx, cy),
_ => return None,
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment