add support for xterm mouse release code (#97)
Codes of the form `ESC [ < 3 ; Cx ; Cy` were not supported before.
This commit is contained in:
parent
11a0ee178a
commit
5e336e10a1
|
@ -182,7 +182,7 @@ fn parse_csi<I>(iter: &mut I) -> Option<Event>
|
||||||
}
|
}
|
||||||
Some(Ok(b'<')) => {
|
Some(Ok(b'<')) => {
|
||||||
// xterm mouse encoding:
|
// xterm mouse encoding:
|
||||||
// ESC [ < Cb ; Cx ; Cy ; (M or m)
|
// ESC [ < Cb ; Cx ; Cy (;) (M or m)
|
||||||
let mut buf = Vec::new();
|
let mut buf = Vec::new();
|
||||||
let mut c = iter.next().unwrap().unwrap();
|
let mut c = iter.next().unwrap().unwrap();
|
||||||
while match c {
|
while match c {
|
||||||
|
@ -216,6 +216,7 @@ fn parse_csi<I>(iter: &mut I) -> Option<Event>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
32 => MouseEvent::Hold(cx, cy),
|
32 => MouseEvent::Hold(cx, cy),
|
||||||
|
3 => MouseEvent::Release(cx, cy),
|
||||||
_ => return None,
|
_ => return None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue