This removes the support for defining links via
vim.treesitter.highlighter.hl_map (never documented, but plugins did
anyway), or the uppercase-only `@FooGroup.Bar` to `FooGroup` rule.
The fallback is now strictly `@foo.bar.lang` to `@foo.bar` to `@foo`,
and casing is irrelevant (as it already was outside of treesitter)
For compatibility, define default links to builting syntax groups
as defined by pre-existing color schemes
Problem: Crash when opening a buffer for the cmdline window fails. (Chris
Barber)
Solution: Check do_ecmd() succeeds. Reset got_int if "q" was used at the
more prompt. (closesvim/vim#6211)
9b7cce28d5
Make code match latest Vim instead.
In non-multigrid UI the only change is that the returned height now
excludes winbar, and this is compatible with Vim.
In multigrid UI this means the return value of these functions now
reflect the space available for buffer lines in a window.
No change in nvim_win_get_height() and nvim_win_get_width().
Problem: Cannot use expand() to get the script name.
Solution: Support expand('<script>'). (closesvim/vim#10121)
6013d0045d
Use `.sn_name` instead of `->sn_name` as v8.2.0154 hasn't been ported.
Cherry-pick builtin.txt expand() doc from latest Vim.
Problem: Insufficient tests for src/buffer.c.
Solution: Add more tests. Move comments related tests to a separate file.
(Yegappan Lakshmanan, closesvim/vim#6325)
b7e2483655
Problem: Several errors are not tested for.
Solution: Add tests. (Yegappan Lakshmanan, closesvim/vim#5892)
ee4e0c1e9a
Omit Test_range() change: reverted in patch 8.2.0615.
Cherry-pick Test_z_no_space_before_xxx() from patch 8.2.0195.
Cherry-pick Test_reverse_sort_uniq() change from patch 8.2.0183.
Make uniq() error behavior consistent with sort().
Cherry-pick Test_set_ttytype() change from patch 8.1.1826.
Cherry-pick quickfix checks from patch 8.1.2373 to test_preview.vim.
Test_viminfo_error() is applicable.
Cherry-pick E1058 from patch 8.2.0149 and port Test_deep_nest() to Lua.
which is both unexpected and different from the Vim behaviour.
Indent was triggered once by the '!' check in insert_execute(), and
inserting the char was correctly skipped, but then triggered again in
insert_check() (provided that cindent was not being ignored after manual
indentation, i.e. `can_cindent == true`).
While this is the smallest fix, another solution would be to remove
VimState#check and instead move that to *_enter()/-_execute(), since the
control flow is pretty unnecessarily convoluted as is. That would also
have the benefit of differing less from the Vim source code.
Problem: Command line popup menu not positioned correctly.
Solution: Also use vim_strsize() on the existing text. (Naruhiko Nishino,
closesvim/vim#9727)
68cc2b8a37
Problem: 'wildmenu' only shows few matches.
Solution: Add the "pum" option: use a popup menu to show the matches.
(Yegappan Lakshmanan et al., closesvim/vim#9707)
3908ef5017
Omit p_wmnu check in cmdline_pum_active() as it can cause problems.
Omit vim_strchr() flags as that isn't really better than bitmasks.
Omit key translations and document it in vim_diff.txt.
Problem: A command defined with `nargs="?"` returns `fargs={""}` to
a Lua callback when executed with no arguments, which is inconsistent
with how`nargs="*"` behaves.
Solution: Pass `fargs={}` for no argument with `nargs="?"` as well.
Problem: The option.c file is too big.
Solution: Split off the code dealing with strings. (Yegappan Lakshmanan,
closesvim/vim#4937)
dac1347b4d
Cherry-pick set_string_option_direct_in_win() from patch 8.1.1405.
Cherry-pick shift_line() comment change from patch 8.1.2096.
Move 'clipboard' default parsing to didset_string_options().
Reorder option flags to put Nvim-only flags at the end.
problem: code for drawing statusline is arbitrarily spreadout between drawscreen.c, screen.c and buffer.c
solution: move it to a new file statusline.c
- rename archaic internal name "status match" to public name "wildmenu"
- showruler() does not show the ruler. it show anything which displays
info about the cursor. Rename it accordingy.
Problem: Insufficient testing for reading/writing files.
Solution: Add more tests. (Yegappan Lakshmanan, closesvim/vim#6257)
Add "ui_delay" to test_override() and use it for the CTRL-O test.
b340baed9f
Omit test_override().
Reorder test_writefile.vim to match Vim.
Problem: Some code in options.c fits better elsewhere.
Solution: Move functions from options.c to other files. (Yegappan
Lakshmanan, closesvim/vim#4889)
e677df8d93
Allows preview callbacks to modify multiple buffers in order to show the
preview. Previously, if multiple buffers were modified, only the current
buffer would have its state restored. After this change, all buffers
have their state restored after preview.
Closes#19103.
These were just added to avoid churn when changing the default
of 'display'. To simplify message handling logic, we might want
to remove support for printing messages in default_grid later on.
This would allow things like printing error messages safely in the
middle of redraw, or a future graduation of the 'multigrid' feature.
Let :wincmd command accept a count like what its documentation suggests.
Previously it could only accept a range, which led to some ambiguity on
which attribute should be used when executing :wincmd using nvim_cmd.
Closes#19662.
Also fix a typo in a related Vim test:
vim-patch:9.0.0223: typo in diffmode test
Problem: Typo in diffmode test.
Solution: Fix the typo. (closesvim/vim#10932)
5fd6ab820b
Problem: The way 'cmdheight' can be made zero is inconsistent.
Solution: Only make 'cmdheight' zero when setting it explicitly, not when
resizing windows. (closesvim/vim#10890)
f797e309ca
Problem: Some Normal mode commands not fully tested.
Solution: Add a few more tests. (Yegappan Lakshmanan, closesvim/vim#7073)
d1ad99b654
Cherry-pick test_registers.vim change from patch 8.2.0644.