If I run tmux under valgrind, then run this command, where
`/proc/5187/fd/0` is tmux's stdin:
```
printf '\e[00000000000000000000000000000000000000000000000000000000000000000' > /proc/5187/fd/0
```
I got this error:
```
==5189== Conditional jump or move depends on uninitialised value(s)
==5189== at 0x484DC78: strlen (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==5189== by 0x4A62451: _IO_str_init_static_internal (strops.c:41)
==5189== by 0x4A2D3FD: _IO_strfile_read (strfile.h:90)
==5189== by 0x4A2D3FD: __isoc23_sscanf (isoc23_sscanf.c:28)
==5189== by 0x19BA81: tty_keys_extended_key (tty-keys.c:1072)
==5189== by 0x19BA81: tty_keys_next (tty-keys.c:822)
==5189== by 0x19D9E7: tty_read_callback (tty.c:192)
==5189== by 0x48B7136: ??? (in /usr/lib/x86_64-linux-gnu/libevent_core-2.1.so.7.0.1)
==5189== by 0x48B793E: event_base_loop (in /usr/lib/x86_64-linux-gnu/libevent_core-2.1.so.7.0.1)
==5189== by 0x17A766: proc_loop (proc.c:213)
==5189== by 0x18EEF3: server_start (server.c:253)
==5189== by 0x12D872: client_connect (client.c:164)
==5189== by 0x12D872: client_main (client.c:295)
==5189== by 0x128307: main (tmux.c:537)
```
This commit fixes that.
Addresses #4421
will guess the theme from the background colour on terminals which do
not themselves support the escape sequence. Written by Jonathan
Slenders, GitHub issue 4353.
mode 2 as well as mode 1. From Stanislav Kljuhhin (GitHub issue 4038).
This changes tmux to always request mode 2 from parent terminal, change
to an unambiguous internal representation of keys, and adds an option
(extended-keys-format) to control the format similar to the xterm(1)
formatOtherKeys resource.
OSC 10 or 11 is received but no colour has been set inside tmux, return
the colour from the first attached client (probably most people will
have all light or or all dark terminals).
protocol (223), tmux was allowing it to wrap around. However, since tmux
was not correctly handling this on input, other programs also do not
handle it correctly, and the alternative SGR mouse mode is now
widespread, this seems unnecessary, so remove this feature. Also define
some constants to make it clearer what the numbers mean. Mostly from
Leonid S Usov in GitHub issue 3165.
since some terminals report them differently 2) use the "backspace"
option to translate backspace 3) map ctrl which are have the ctrl
implied (such as C-x) properly when the terminal reports both the key
and the modifier.
Note that any key bindings for C-X where C-x is meant must now be
changed.
converted to M-Up. Do not give them the implied meta flag so they don't
match the M-Up entry in the output key tree. Fixes problem with vi
reported by jsing@.