Add new "splice" interface for tracking buffer changes at the byte
level. This will later be reused for byte-resolution buffer updates.
(Implementation has been started, but using undocumented "_on_bytes"
option now as interface hasn't been finalized).
Use this interface to improve many edge cases of extmark adjustment.
Changed tests indicate previously incorrect behavior. Adding tests for
more edge cases will be follow-up work (overlaps on_bytes tests)
Don't consider creation/deletion of marks an undoable event by itself.
This behavior was never documented, and imposes complexity for little gain.
Add nvim__buf_add_decoration temporary API for direct access to the new
implementation. This should be refactored into a proper API for
decorations, probably involving a huge dict.
fixes#11598
Problem: The Normal highlight is not defined when compiled with GUI.
Solution: Always define Normal. (Christian Brabandt, closesvim/vim#4072)
f90b6e03a9
Problem: Popupmenu is too far left when completion is long. (Linwei)
Solution: Adjust column computations. (Hirohito Higashi, closesvim/vim#2661)
bb008dd323
Problem: The minimum width of the popup menu is hard coded.
Solution: Add the 'pumwidth' option. (Christian Brabandt, James McCoy,
closesvim/vim#2314)
a8f04aa275
Autocmds may close window while it is being entered, then
win_set_minimal_style(wp) operates on an invalid pointer.
We could silently ignore this instead, but it is unlikely to be
intentional, so it is more useful to show an error.
fix#11383
These options were previously global. A global-local window option
behaves closer to a global option "per default" (i e with :set),
but still supports local behavior via :setl
Also this restores back-compat for nvim_set_option("fcs", ...)
which are currently broken on 0.4.x but worked in earlier versions
NB: this is not the final implementation. Bufhl should be made a
part of the extmark tree, so that "start" adjustment just works
automatically. But "stop" will still need some ad-hoc trickery,
until extended marks natively support ranges (hopefully sooner than
forever).
* Clear 'cc' in nvim_open_win 'minimal' style #11361
Add 'colorcolumn' to the list of options that should be cleared when creating
a 'minimal'-style floating window.
- Running out of retries, or unexpected screen state should make the
test FAIL, not ERROR.
- Uses levels to report the location of the caller.
- Improve message with retry-failure (formatting).
Before:
[ RUN ] test: 103.53 ms ERR
test/functional/helpers.lua:388:
retry() attempts: 1
test/functional/ui/screen.lua:587: Row 1 did not match.
Expected:
|*X^ |
|{0:~ }|
|{0:~ }|
| |
Actual:
|*^ |
|{0:~ }|
|{0:~ }|
| |
To print the expect() call that would assert the current screen state, use
screen:snapshot_util(). In case of non-deterministic failures, use
screen:redraw_debug() to show all intermediate screen states.
stack traceback:
test/functional/helpers.lua:388: in function 'retry'
test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>
After:
[ RUN ] test: 105.22 ms FAIL
test/functional/test_spec.lua:24: stopping after 1 retry() attempts.
test/functional/test_spec.lua:25: Row 1 did not match.
Expected:
|*X^ |
|{0:~ }|
|{0:~ }|
| |
Actual:
|*^ |
|{0:~ }|
|{0:~ }|
| |
To print the expect() call that would assert the current screen state, use
screen:snapshot_util(). In case of non-deterministic failures, use
screen:redraw_debug() to show all intermediate screen states.
stack traceback:
test/functional/helpers.lua:389: in function 'retry'
test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>
It is perfectly fine and expected to detach from the screen just by
the UI disconnecting from nvim or exiting nvim. Just keep detach() in
screen_basic_spec, to get some coverage of the detach method itself.
This avoids hang on failure in many situations (though one could argue
that detach() should be "fast", or at least "as fast as resize",
which works in press-return already).
Never use detach() just to change the size of the screen, try_resize()
method exists for that specifically.
PR #8221 took a short-cut when implementing the tests: screen.lua would
translate the linegrid highlight ids back into the old per-cell
attribute description.
Apart from cleaning up technical debt, this enables to check both rgb
and cterm colors in the same expect(), which previously was needlessly
restricted to ext_hlstate tests only.