mc: multple fixes (#2367)
[termux-packages] / packages / mc / lib-tty-key.c.patch
1 The code assumes that "kmous" capability is for X10 mouse reporting,
2 so if an event for kmous happens it tries to decode it according to
3 the X10 protocol.
4
5 This breaks starting with ncurses 6.1 as the terminfo for xterm
6 started using the SGR sequence for xterm in 6.1.
7
8 This is a hacky, non-invasive patch which just assumes that the SGR
9 protocol is used.
10
11 diff -u -r ../mc-4.8.20/lib/tty/key.c ./lib/tty/key.c
12 --- ../mc-4.8.20/lib/tty/key.c 2017-03-04 18:51:38.000000000 +0100
13 +++ ./lib/tty/key.c 2018-02-08 23:19:38.207353992 +0100
14 @@ -2140,7 +2140,7 @@
15 || c == MCKEY_EXTENDED_MOUSE))
16 {
17 /* Mouse event */
18 - xmouse_get_event (event, c == MCKEY_EXTENDED_MOUSE);
19 + xmouse_get_event (event, 1);
20 c = (event->type != 0) ? EV_MOUSE : EV_NONE;
21 }
22 else if (c == MCKEY_BRACKETED_PASTING_START)