This commit doesn't change any behavior, only moves the init out of main.c We
_could_ move some initialization from tui.c:terminfo_start to an earlier phase,
in order to avoid mis-reporting 't_Co' during startup. But this will be messy,
and gains very little: TERM=linux works "good enough" as long as we correct t_Co
in tui.c:terminfo_start (c5b02d5a7).
Closes#3428
References #4999
The Linux "virtual consoles" available on Alt-F1...Alt-F7 (i.e.
tty1-tty7) support only 8 colors (actually, it's 16 colors when counted
together with "bold/bright" attribute) and 8 background colors (those in
some cases can be upped to 16 too, by using "blink" attribute - but this
might be more risky, in case some legacy consoles really show it as
blinking? I'm not sure about that.) This limit is buried deep in kernel
sources for default tty drivers. Trying to use the Neovim's default 256
colors in this case gives totally bad colors, breaking all color schemes
and sometimes rendering parts of the text invisible. A simple change
enables code paths for handling 8/16 colors, which are still present in
Neovim codebase.
A single line was deleted from `ex_drop()` in 1a91000 when fixing clint
warnings causing the `:drop` command to not work correctly if the buffer
is not already open in a window.
Fixes#4981
Only update some entries that are already in `version.c`. Mercilessly stolen from https://github.com/neovim/neovim/pull/4634. At least one possible contributor got confused by it not being as-up-do-date-as-it-coul-be(tm). We shouldn't have that.
1005, 1010: :smile
1039: small Build
1058, 1073, 1079, 1097: alloc
1555, 1556, 1573: Makefile
1560, 1579: channel
Also adds one exception to linter rules:
typedef struct {
kvec_t(Object) stack;
} EncodedData;
is completely valid (from the style guide point of view) code.
It appears that used msgpack library is not able to parse back message created
by msgpack_rpc_from_object() if nesting level is too high, so log_server_msg now
cares about msgpack_unpack_next() return value. Also error message from
server_notifications_spec.lua is not readable if something is wrong (though at
least now it does not crash when parsing deeply nested structures).
log_server_msg() in the test reports
[msgpack-rpc] nvim -> client(1) [error] "parse error"