Problem: Code in eval.c not sufficiently covered by tests.
Solution: Add more tests. (Yegappan Lakshmanan, closesvim/vim#5815)
8b63313510
Only port test_expr.vim and the first hunk of test_cmdline.vim.
Add missing test from patch 7.4.1755.
Cherry-pick test_expr.vim change from patch 8.2.2060.
- Prevent duplicate version strings such as v0.8.0-v0.8.0.
- Change the format for git releases from v0.9.0-dev-67-g625ba79be to
v0.9.0-dev-67+g625ba79be.
Nvim versions are now:
release : v0.9.0
prerelease without git info: v0.9.0-dev
prerelease with git info : v0.9.0-dev-67+g625ba79be
Problem:
`gen_help_html.lua` does not properly handle tab characters after
"concealed" text (tags, taglinks, codespans). This causes misaligned
layout in "old" (preformatted) docs.
For text like `*tag*`, |tag_link|, and `code_span`, Vim hides the "*",
"|", "`" characters, but Vim still counts those characters for "virtual
column" when a tab character follows it. So if you have a tag of say
6 characters long, those two concealed character would lead to the tab
character after it start at column 8. gen_help_html.lua doesn't account
for that which leads to formatting flaws in the generated output.
Solution:
Add two spaces after concealed nodes that are followed by a tab char.
Problem: Clang format configuration files are not recognized.
Solution: Use yaml for Clang format configuration files. (Marwin Glaser,
closesvim/vim#11398)
3c708c4390
Problem: Mouse column not correctly used for popup_setpos.
Solution: Adjust off-by-one error and handle Visual line selection properly.
(Yee Cheng Chin, closesvim/vim#11356)
17822c507c
The test_termcodes.vim test cannot be used. Use a Lua test instead.
Problem: ModeChanged autocmd not executed when Visual mode is ended with
CTRL-C.
Solution: Do not trigger the autocmd when got_int is set. (closesvim/vim#11394)
61c4b04799
Cherry-pick removal of cmdwin feature check from patch 9.0.0663.
Problem: Captures used by bundled parsers are not highlighted by default
Solution: Add links to default groups
A link is added for a capture if
* there is a default group of the same name (e.g., `@tag` -> `Tag`)
* it's used in a bundled query and doesn't have a reasonable fallback
(e.g., `@text.literal`)
Also add all linked groups to the treesitter docs.
If the call to `qf_setup_state()` in `qf_init_ext()` fails, control flow jumps
to label `qf_init_end` where a call to `qf_update_buffer()` is made with
`old_last` as a function call argument.
Prior to this patch, `old_last` would not yet have been initialized to its
default value of `NULL`, resulting in `qf_update_buffer()` attempting to compare
against its uninitialized value (quickfix.c:3882) then later forwarding it to
`qf_fill_buffer()` where the address is dereferenced and repeatedly read from/
written to for performing core qflist operations.
Depending on what the default value of `old_last` was, the results may range
from a best case scenario of neovim terminating with SIGSEGV from an attempt to
dereference an invalid pointer (quickfix.c:4056) to memory corruption if it
contained some other value that results in `qfp` being initialized from
`old_last->qf_next` (after which it is subsequently written to and read from in
a fairly arbitrary fashion).
Though extremely unlikely, it's possible for there to be security considerations
as a user can ensure that the next call to `qf_setup_state()` fails.
This patch ensures that `old_last` is NULL-assigned before control flow jumps to
`qf_init_end`.
Closes#20639.
vim-patch:9.0.0780: 'scroll' value computed in unexpected location
Problem: 'scroll' value computed in unexpected location.
Solution: Compute 'scroll' when the window height is changed. (Luuk van
Baal, closesvim/vim#11387)
a1a46da87d
* fix(man): handle absolute paths as :Man targets
Previously, attempting to provide `:Man` with an absolute path as the name would
cause neovim to return the following error:
```
Error detected while processing command line:
/usr/local/share/nvim/runtime/lua/man.lua:690: /usr/local/share/nvim/runtime/lua/man.lua:683: Vim:E426: tag not found: nil(nil)
Press ENTER or type command to continue
```
..because it would try to validate the existence of a man page for the provided
name by executing `man -w /some/path` which (on at least some Linux machines
[0]) returns `/some/path` instead of the path to the nroff files that would be
formatted to satisfy the man(1) lookup.
While man pages are not normally named after absolute paths, users shouldn't be
blamed for trying. Given such a name/path, neovim would **not** complain that
the path didn't have a corresponding man file but would error out when trying
to call the tag function for the null-propagated name-and-section `nil(nil)`.
(The same underlying error existed before this function was ported to lua, but
did not exhibit the lua-specific `nil(nil)` name; instead a tag lookup for `()`
would fail and error out.)
With this patch, we detect the case where `man -w ...` returns the same value as
the provided name to not only prevent invoking the tag function for a
non-existent/malformed name+sect but also to properly report the non-existence
of a man page for the provided lookup (the absolute path).
While man(1) can be used to directly read an nroff-formatted document via `man
/path/to/nroff.doc`, `:Man /path/to/nroff.doc` never supported this behavior so
no functionality is lost in case the provided path _was_ an nroff file.
[0]: `man -w /absolute/path` returning `/absolute/path` observed on an Ubuntu
18.04 installation.
* test: add regression test for #20624
Add a functional test to `man_spec.lua` to check for a regression for #20624 by
first obtaining an absolute path to a random file and materializing it to disk,
then attempting to query `:Man` for an entry by that same name/path.
The test passes if nvim correctly reports that there is no man page
correspending to the provided name/path and fails if any other error (or no
error) is shown.
Made obsolete by now graduated `filetype.lua` (enabled by default).
Note that changes or additions to the filetype detection still need to
be made through a PR to vim/vim as we port the _logic_ as well as tests.
vim-patch:9.0.0771: cannot always tell the difference beween tex and rexx files
Problem: Cannot always tell the difference beween tex and rexx files.
Solution: Recognize tex by a leading backslash. (Martin Tournoij,
closesvim/vim#11380)
bd053f894b
Problem:
LSP client provides bogus capabilities in CodeActionKind.
LSP logs show this in the "initialize" message:
codeActionKind = { valueSet = { "Empty", "QuickFix",
"Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite",
"Source", "SourceOrganizeImports", "", "quickfix", "refactor",
"refactor.extract", "refactor.inline", "refactor.rewrite", "source",
"source.organizeImports" }
Solution:
Only the values from the CodeActionKind table should be presented, not also the
keys.
fix#20657
Problem: Lisp word only recognized when a space follows.
Solution: Also match a word at the end of a line. Rename the test. Use a
compiled function to avoid backslashes.
d26c5805bc
Keep the old Test_lisp_indent().