Clang-tidy already does what check-single-includes does automatically on
top of its regular linting. It is also generator independent, so it
doesn't take an eternity to run on slower generators such as Visual
Studio.
While the new RPC encoder/decoder implementation in general should have
less overhead than the deleted UIBridge serializer previously used for
the TUI, it regresses on redraw latency in one important aspect.
The old bridge implementation allowed the TUI to process a
previous screen line internally in parallel with the main thread
rendering the next one in win_line etc. As printing the escape
sequences in highlighted cells has a considerable hit in profiles,
this has a substantial effect on redraw latency. The RPC implementation,
however, waits with sending any data until either a flush, or the buffer is full.
This change lowers the granularity of communication again, using an
adjustable threshold counted in number of cell events (discounting
long repeats and clearing as maximum a single extra event).
The current value is guesstimated to something simple on a reasonable
scale, which should be bigger than a single line, but multiple events
for a big multi-window screen.
This makes it easier to see that -D is referring to the entire
"<variable>=<value>", rather than only <variable>. It also help syntax
highlighters highlight built-in variables.
Problem: Move language files are not recognized.
Solution: Recognize Move language files. (Amaan Qureshi, closesvim/vim#11947)
6642982bea
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
The universal macos release is particularly sensitive to build system
changes. Adding a job that builds a universal binary whenever a cmake
file is changed will help prevent future release breaks.
Problem: CTRL-N and -P on cmdline don't trigger CmdlineChanged.
Solution: Jump to cmdline_changed instead of cmdline_not_changed.
(closesvim/vim#11956)
af9e28a5b8
Cherry-pick Test_Cmdline() change from patch 9.0.1039.
In a few places ipairs was used to iterate over elements of the array.
However, the first return value of ipairs was erronously used, which is
not the value, but rather the index. This would result in errors, for
instance when trying to retrieve a field from the value.
Problem: Display shows lines scrolled down erroneously. (Yishai Lerner)
Solution: Do not change "wl_lnum" at index zero. (closesvim/vim#11938)
61fdbfa1e3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
1. Some calls to preserve_exit() don't put a message in IObuff, so the
IObuff printed by preserve_exit() contains unrelated information.
2. If a TUI client runs out of memory or receives a deadly signal, the
error message is shown on alternate screen and cannot be easily seen
because the TUI exits alternate screen soon afterwards.
Solution:
Pass error message to preserve_exit() and exit alternate screen before
printing it.
Note that this doesn't fix the problem that server error messages cannot
be easily seen on exit. This is tracked in #21608 and #21843.
Problem: Cursor may move with autocmd in Visual mode.
Solution: Restore "VIsual_active" before calling check_cursor().
(closesvim/vim#11939)
49f0524fb5
file(GENERATE) has surprising behavior as it doesn't allow different
file contents for configurations with the same file name. This results
in an error when building neovim with a multi-config generator. Use a
workaround for now where we set the build type for multi-config
generators to "Unknown".
Any logic involving CMAKE_BUILD_TYPE is automatically broken as it won't
work with multi-config generators. The only exception is if we
explicitly check whether the current generator is single-config as well.
Instead, use generator expressions or cmake variables that allows to set
options for certain build types only such as
INTERPROCEDURAL_OPTIMIZATION_<CONFIG>.
Opt to generate all headers with optimization level O2 with no debug
information for all build types as that is the simplest way to make it
behave the same for all generators.
The "length-of-one" trick, where the last element of a struct is an
array of size 1, but extra size is allocated when calling malloc where
it uses more than 1 element in the array, cause problems with some
compilers. Some compilers set _FORTIFY_SOURCE=2 by default which
incorrectly considers it as an overflow. More information:
https://github.com/neovim/neovim/issues/223#issuecomment-1413828554
Using flexible array members allows us to to properly convey to the
compiler that its size may be larger than 1. This also enables us to
remove lengthy workarounds that are unreliable, as they depend on
CMAKE_BUILD_TYPE which isn't defined for multi-config generators.
Closes: https://github.com/neovim/neovim/issues/223
Problem:
When a TUI client is suspended it still receives UI events from the
server, and has to process these accumulated events when it is resumed.
With mulitple TUI clients this is a bigger problem, considering the
following steps:
1. A TUI client is attached.
2. CTRL-Z is pressed and the first client is suspended.
3. Another TUI client is attached.
4. CTRL-Z is pressed and a "suspend" event is sent to both clients. The
second client is suspended, while the first client isn't able to
process the event because it has already been suspended.
5. The first client is resumed. It processes the accumulated "suspend"
event and suspends immediately.
Solution:
Make a TUI client detach on suspend and re-attach on resume.