neovim/test/functional
bfredl b04286a187 feat(extmark): support proper multiline ranges
The removes the previous restriction that nvim_buf_set_extmark()
could not be used to highlight arbitrary multi-line regions

The problem can be summarized as follows: let's assume an extmark with a
hl_group is placed covering the region (5,0) to (50,0) Now, consider
what happens if nvim needs to redraw a window covering the lines 20-30.
It needs to be able to ask the marktree what extmarks cover this region,
even if they don't begin or end here.

Therefore the marktree needs to be augmented with the information covers
a point, not just what marks begin or end there. To do this, we augment
each node with a field "intersect" which is a set the ids of the
marks which overlap this node, but only if it is not part of the set of
any parent. This ensures the number of nodes that need to be explicitly
marked grows only logarithmically with the total number of explicitly
nodes (and thus the number of of overlapping marks).

Thus we can quickly iterate all marks which overlaps any query position
by looking up what leaf node contains that position. Then we only need
to consider all "start" marks within that leaf node, and the "intersect"
set of that node and all its parents.

Now, and the major source of complexity is that the tree restructuring
operations (to ensure that each node has T-1 <= size <= 2*T-1) also need
to update these sets. If a full inner node is split in two, one of the
new parents might start to completely overlap some ranges and its ids
will need to be moved from its children's sets to its own set.
Similarly, if two undersized nodes gets joined into one, it might no
longer completely overlap some ranges, and now the children which do
needs to have the have the ids in its set instead. And then there are
the pivots! Yes the pivot operations when a child gets moved from one
parent to another.
2023-09-12 10:38:23 +02:00
..
api feat(extmark): support proper multiline ranges 2023-09-12 10:38:23 +02:00
autocmd test: add some tests for SafeState autocommand 2023-08-21 14:16:16 +08:00
core feat(remote): avoid --remote-ui infinite loop (#24465) 2023-08-13 14:14:08 +08:00
editor fix(folds): update folds in Insert mode with fdm=indent (#24402) 2023-07-21 08:56:08 +08:00
ex_cmds fix(messages): use "Vimscript" instead of "VimL" #24111 2023-06-22 04:09:14 -07:00
fixtures feat(lsp): map K to hover by default #24331 2023-07-14 09:47:18 -07:00
legacy feat(extmark): support proper multiline ranges 2023-09-12 10:38:23 +02:00
lua fix(diagnostic): always return copies of diagnostic items (#25010) 2023-09-06 12:54:18 -05:00
options test(options/defaults_spec): fix NVIM_APPNAME test flakiness (#24553) 2023-08-04 10:37:47 +08:00
plugin fix(api): more intuitive cursor updates in nvim_buf_set_text 2023-09-11 08:16:03 +04:00
provider fix(messages): use "Vimscript" instead of "VimL" #24111 2023-06-22 04:09:14 -07:00
shada fix(shada): update marks when using delmarks! (#24978) 2023-09-03 10:34:09 +08:00
terminal fix(ui): avoid ambiguity about chunk that clears part of line (#24982) 2023-09-02 18:50:12 +08:00
treesitter fix(query_error): multiline bug 2023-08-31 15:12:17 +01:00
ui feat(extmark): support proper multiline ranges 2023-09-12 10:38:23 +02:00
vimscript fix(tests): set SHELL=sh #24941 2023-09-11 10:01:00 -07:00
example_spec.lua
helpers.lua feat(extmark): support proper multiline ranges 2023-09-12 10:38:23 +02:00
preload.lua