From 5e336e10a1db2d5e2bcd1cfa877f1c31f5e82796 Mon Sep 17 00:00:00 2001 From: IGI-111 Date: Fri, 24 Mar 2017 21:48:55 +0100 Subject: [PATCH] add support for xterm mouse release code (#97) Codes of the form `ESC [ < 3 ; Cx ; Cy` were not supported before. --- src/event.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/event.rs b/src/event.rs index c65e827..45c0438 100644 --- a/src/event.rs +++ b/src/event.rs @@ -182,7 +182,7 @@ fn parse_csi(iter: &mut I) -> Option } 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(iter: &mut I) -> Option } } 32 => MouseEvent::Hold(cx, cy), + 3 => MouseEvent::Release(cx, cy), _ => return None, };