neovim/test/functional/legacy
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
..
002_filename_recognition_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
004_bufenter_with_modelines_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
005_bufleave_delete_buffer_spec.lua A Mudholland Dr. Recast 2020-10-19 21:48:06 +02:00
007_ball_buffer_list_spec.lua test: update tests to work with 'hidden' 2021-08-18 12:17:12 -06:00
008_autocommands_spec.lua fix(tests): check for EOF on exit of nvim properly 2022-06-13 10:15:44 +02:00
011_autocommands_spec.lua test: replace lfs with luv and vim.fs 2023-04-04 21:59:06 +02:00
012_directory_spec.lua test: don't unnecessarily specify win/buf for nvim_(get|set)_option_value 2023-05-22 13:02:07 +06:00
015_alignment_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
018_unset_smart_indenting_spec.lua functests: Refactor legacy/018_unset_smart_indenting_spec 2017-04-08 22:02:44 +03:00
019_smarttab_expandtab_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
020_blockwise_visual_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
021_control_wi_spec.lua doc: fix typos [ci skip] #11787 2020-01-30 22:56:34 -08:00
023_edit_arguments_spec.lua A Mudholland Dr. Recast 2020-10-19 21:48:06 +02:00
025_jump_tag_hidden_spec.lua test: simplify platform detection (#21020) 2022-11-22 08:13:30 +08:00
026_execute_while_if_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
028_source_ctrl_v_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
029_join_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
030_fileformats_spec.lua docs: fix typos (#20394) 2022-09-30 09:53:52 +02:00
031_close_commands_spec.lua fix(tests): check for EOF on exit of nvim properly 2022-06-13 10:15:44 +02:00
033_lisp_indent_spec.lua A Mudholland Dr. Recast 2020-10-19 21:48:06 +02:00
034_user_function_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
035_increment_and_decrement_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
036_regexp_character_classes_spec.lua A Mudholland Dr. Recast 2020-10-19 21:48:06 +02:00
038_virtual_replace_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
039_visual_block_mode_commands_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
043_magic_settings_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
044_099_regexp_multibyte_magic_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
046_multi_line_regexps_spec.lua functests: Check logs in lua code 2016-06-10 21:50:49 +03:00
054_buffer_local_autocommands_spec.lua functests: Refactor legacy/054_buffer_local_autocommands_spec 2017-04-08 22:33:02 +03:00
055_list_and_dict_types_spec.lua vim-patch:8.2.1698: cannot lock a variable in legacy Vim script like in Vim9 (#21883) 2023-01-19 08:03:13 +08:00
056_script_local_function_spec.lua functests: Check logs in lua code 2016-06-10 21:50:49 +03:00
057_sort_spec.lua A Mudholland Dr. Recast 2020-10-19 21:48:06 +02:00
060_exists_and_has_functions_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
061_undo_tree_spec.lua test: avoid name collisions with Xtest directory (#23019) 2023-04-11 17:18:54 +08:00
063_match_and_matchadd_spec.lua vim-patch:9.0.0622: matchaddpos() can get slow when adding many matches 2022-10-02 07:28:38 +08:00
065_float_and_logic_operators_spec.lua functests: Fix linter errors 2017-04-09 03:31:13 +03:00
066_visual_block_tab_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
067_augroup_exists_spec.lua functests: Fix legacy/067_augroup_exists_spec 2017-04-09 03:24:15 +03:00
068_text_formatting_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
069_multibyte_formatting_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
072_undo_file_spec.lua docs: fix typos (#20394) 2022-09-30 09:53:52 +02:00
074_global_var_in_viminfo_spec.lua test: replace lfs with luv and vim.fs 2023-04-04 21:59:06 +02:00
078_swapfile_recover_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
081_coptions_movement_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
082_string_comparison_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
083_tag_search_with_file_encoding_spec.lua docs: fix typos (#20394) 2022-09-30 09:53:52 +02:00
090_sha256_spec.lua functests: Check logs in lua code 2016-06-10 21:50:49 +03:00
091_context_variables_spec.lua buffer: Bind b:changedtick to b:['changedtick'], remove special cases 2017-02-23 19:46:44 +03:00
092_mksession_cursor_cols_utf8_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
093_mksession_cursor_cols_latin1_spec.lua win: enable legacy test 093 2018-02-19 07:10:43 -05:00
094_visual_mode_operators_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
095_regexp_multibyte_spec.lua vim-patch:8.2.0010: test64 is old style 2019-12-16 19:38:29 -05:00
096_location_list_spec.lua test: robust cleanup, unique filenames #7950 (#7950) 2018-02-01 03:12:37 +01:00
097_glob_path_spec.lua test: simplify platform detection (#21020) 2022-11-22 08:13:30 +08:00
101_hlsearch_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
102_fnameescape_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
103_visual_mode_reset_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
106_errorformat_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
107_adjust_window_and_contents_spec.lua A Mudholland Dr. Recast 2020-10-19 21:48:06 +02:00
108_backtrace_debug_commands_spec.lua vim-patch:8.1.0550: expression evaluation may repeat an error message 2018-11-30 23:35:36 -05:00
arglist_spec.lua vim-patch:8.2.3885: arglist test fails 2022-10-05 22:40:28 +08:00
assert_spec.lua feat(api): nvim_exec2(), deprecate nvim_exec() #19032 2023-03-25 09:58:48 -07:00
autochdir_spec.lua test: replace lfs with luv and vim.fs 2023-04-04 21:59:06 +02:00
autocmd_option_spec.lua feat(options)!: remove compatible behaviours for vim 5.0 and earlier 2023-07-17 14:27:21 +01:00
autoformat_join_spec.lua A Mudholland Dr. Recast 2020-10-19 21:48:06 +02:00
breakindent_spec.lua fix(ui): wrong cursor position with left gravity inline virt text at eol 2023-08-28 05:51:01 +08:00
buffer_spec.lua refactor(options): deprecate nvim[_buf|_win]_[gs]et_option 2023-05-21 15:14:01 +06:00
changelist_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
charsearch_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
close_count_spec.lua A Mudholland Dr. Recast 2020-10-19 21:48:06 +02:00
cmdline_spec.lua refactor(options): deprecate nvim[_buf|_win]_[gs]et_option 2023-05-21 15:14:01 +06:00
command_count_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
comparators_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
conceal_spec.lua vim-patch:9.0.0662: concealed characters do not work correctly (#23454) 2023-05-03 07:54:17 +08:00
cpoptions_spec.lua vim-patch:8.2.0482: channel and sandbox code not sufficiently tested 2022-07-15 10:50:21 +08:00
crash_spec.lua vim-patch:9.0.1840: [security] use-after-free in do_ecmd (#24993) 2023-09-03 11:15:43 +08:00
delete_spec.lua vim-patch:8.2.2857: Vim9: exception in ISN_INSTR caught at wrong level (#23131) 2023-04-16 18:27:33 +08:00
digraph_spec.lua vim-patch:8.2.1022: various parts of code not covered by tests 2022-11-04 20:54:50 +08:00
display_spec.lua vim-patch:9.0.1759: Visual highlight not working with cursor at end of screen line (#24806) 2023-08-21 07:18:39 +08:00
edit_spec.lua vim-patch:8.2.3135: Vim9: builtin function arguments not checked at compile time 2023-05-05 09:19:05 +08:00
erasebackword_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
eval_spec.lua vim-patch:8.2.4890: inconsistent capitalization in error messages 2023-05-05 09:20:30 +08:00
ex_mode_spec.lua test: use poke_eventloop() instead of sleep(10) where possible (#19794) 2022-08-16 15:21:46 +08:00
excmd_spec.lua test: simplify platform detection (#21020) 2022-11-22 08:13:30 +08:00
filechanged_spec.lua refactor(options): deprecate nvim[_buf|_win]_[gs]et_option 2023-05-21 15:14:01 +06:00
fixeol_spec.lua test: fixeol cleanup created files #18785 2022-05-28 10:34:18 -07:00
fnamemodify_spec.lua vim-patch:8.2.3468: problem with :cd when editing file in non-existent directory 2021-11-19 20:07:04 +08:00
fold_spec.lua vim-patch:8.2.2713: folding code not sufficiently tested 2022-11-25 15:55:43 +08:00
function_sort_spec.lua test: correct order of arguments to eq() and neq() 2022-04-26 11:38:58 +08:00
getcwd_spec.lua win: enable legacy/getcwd_spec.lua 2018-02-19 07:10:43 -05:00
gf_spec.lua refactor: remove E5500, adjust tests 2023-01-16 18:03:08 +08:00
glob2regpat_spec.lua vim-patch:8.2.2949: tests failing because no error for float to string conversion 2023-06-12 13:27:16 +08:00
global_spec.lua test: use poke_eventloop() instead of sleep(10) where possible (#19794) 2022-08-16 15:21:46 +08:00
highlight_spec.lua vim-patch:9.0.1626: Visual area not shown when using 'showbreak' (#23978) 2023-06-11 11:29:39 +08:00
increment_spec.lua docs: fix typos 2022-11-02 21:45:26 +08:00
insertcount_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
join_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
lispwords_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
listchars_spec.lua docs: fix typos (#18269) 2022-06-04 11:56:36 +08:00
listlbr_spec.lua vim-patch:9.0.0702: incomplete testing cursor position with 'linebreak' set 2022-10-09 19:09:32 +08:00
listlbr_utf8_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
mapping_spec.lua test: use poke_eventloop() instead of sleep(10) where possible (#19794) 2022-08-16 15:21:46 +08:00
marks_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
match_spec.lua vim-patch:8.2.4062: match highlighting of tab too short 2022-11-24 19:10:00 +08:00
memory_usage_spec.lua feat(extmark): support proper multiline ranges 2023-09-12 10:38:23 +02:00
messages_spec.lua vim-patch:9.0.1635: error message is cleared when removing mode message 2023-06-16 08:55:05 +08:00
mksession_spec.lua refactor(options): remove obsolete distinction of "vi" vs "vim" defaults 2021-07-14 21:54:19 +02:00
move_spec.lua vim-patch:9.0.1279: display shows lines scrolled down erroneously (#22126) 2023-02-05 09:37:12 +08:00
nested_function_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
normal_spec.lua vim-patch:9.0.1530: cursor moves to wrong line when 'foldmethod' is "diff" 2023-05-09 22:40:24 +02:00
options_spec.lua test: move oldtests to test directory (#22536) 2023-03-07 11:13:04 +08:00
prompt_buffer_spec.lua vim-patch:9.0.1443: ending Insert mode when accessing a hidden prompt buffer (#22984) 2023-04-10 07:33:26 +08:00
put_spec.lua vim-patch:9.0.1597: cursor ends up below the window after a put (#23873) 2023-06-02 08:48:49 +08:00
qf_title_spec.lua functests: Check logs in lua code 2016-06-10 21:50:49 +03:00
scroll_opt_spec.lua fix(plines): don't return very large height on very long line (#24260) 2023-07-05 16:30:23 +08:00
search_mbyte_spec.lua A Mudholland Dr. Recast 2020-10-19 21:48:06 +02:00
search_spec.lua vim-patch:9.0.1697: incsearch test not sufficient (#24683) 2023-08-13 07:10:24 +08:00
search_stat_spec.lua vim-patch:9.0.1518: search stats not always visible when searching backwards (#23517) 2023-05-07 07:57:29 +08:00
signs_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
source_spec.lua vim-patch:9.0.0969: matchparen highlight is not updated when switching buffers (#21227) 2022-11-29 10:17:57 +08:00
statusline_spec.lua vim-patch:9.0.1195: restoring KeyTyped when building statusline not tested 2023-01-14 20:27:40 +08:00
substitute_spec.lua vim-patch:9.0.0457: substitute prompt does not highlight an empty match (#20186) 2022-09-13 22:08:01 +08:00
syn_attr_spec.lua test(syn_attr_spec): add more information (#21912) 2023-01-20 10:03:29 +08:00
tabline_spec.lua vim-patch:9.0.1195: restoring KeyTyped when building statusline not tested 2023-01-14 20:27:40 +08:00
tagcase_spec.lua test: lint whitespace in legacy/ (#7308) 2017-09-24 20:42:48 +02:00
textobjects_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00
undolevels_spec.lua vim-patch:7.4.1740 2016-09-22 01:46:30 +07:00
utf8_spec.lua vim-patch:8.2.4152: block insert with double wide character fails 2022-02-14 17:29:49 +00:00
vimscript_spec.lua refactor(options): deprecate nvim[_buf|_win]_[gs]et_option 2023-05-21 15:14:01 +06:00
visual_spec.lua vim-patch:9.0.1759: Visual highlight not working with cursor at end of screen line (#24806) 2023-08-21 07:18:39 +08:00
window_cmd_spec.lua vim-patch:9.0.1772: Cursor may be adjusted in 'splitkeep'ed windows (#24811) 2023-08-21 08:58:18 +08:00
wordcount_spec.lua test: correct order of arguments to eq() and neq() 2022-04-26 11:38:58 +08:00
writefile_spec.lua functests: Replace execute with either command or feed_command 2017-04-09 03:24:08 +03:00