docs(api): pattern is not expanded for autocommands
Problem: Unlike `:autocmd`, `nvim_create_autocommand()` does not expand
environment variables in the `pattern`, which is unexpected.
Solution: Add a note to the documentation explaining this and suggesting
using `expand()` explicitly.
(cherry picked from commit eeaf943ca3)
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Problem: 'langmap' works differently when there are modifiers.
Solution: Only apply 'langmap' to a character where modifiers have no
effect. (closesvim/vim#11395, closesvim/vim#11404)
49660f5139
(cherry picked from commit e8877c4d7b)
build: don't append git tag on release versions
This prevents duplicate version strings such as v0.8.0-v0.8.0.
Also change the format for git releases from v0.9.0-dev-67-g625ba79be
to v0.9.0-dev-67+g625ba79be. The neovim 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
(cherry picked from commit 90785aafe1)
Co-authored-by: dundargoc <gocdundar@gmail.com>
fix(highlight): link more treesitter groups by default
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.
(cherry picked from commit 0ee8b88b10)
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
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.
(cherry picked from commit 72d2f5aef4)
Problem: User command does not get number from :tab modifier.
Solution: Include the number. (closesvim/vim#11393, closesvim/vim#6901)
208567e9d7
(cherry picked from commit a43a46f1e6)
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.
(cherry picked from commit 8a762eba60)
Problem: SpellFileMissing autocmd may delete buffer.
Solution: Disallow deleting the current buffer to avoid using freed memory.
ef976323e7
(cherry picked from commit 6bc2d6b66b)
Problem: Crash when a callback deletes a window that is being used.
Solution: Do not unload a buffer that is being displayed while redrawing the
screen. Also avoid invoking callbacks while redrawing.
(closesvim/vim#2107)
94f01956a5
Omit parse_queued_messages(): N/A.
Cherry-pick a break statement from patch 8.1.0425.
(cherry picked from commit 65cbe0cc35)
vim-patch:9.0.0750: crash when popup closed in callback
Problem: Crash when popup closed in callback. (Maxim Kim)
Solution: In syntax_end_parsing() check that syn_block is valid.
0abd6cf62d
(cherry picked from commit 2a2ae32ceb)
Problem:
The generated ToC (table of contents) uses anchors derived from the
heading title, e.g. the "Global Plugins" heading yields:
https://neovim.io/doc/user/usr_05.html#_global-plugins-
so if the heading title changes, then the old URL (anchor) is broken.
Solution:
:help tags change less often than heading titles, so if a heading
contains a *tag*, use that as its anchor name instead. Example:
https://neovim.io/doc/user/usr_05.html#standard-plugin
(cherry picked from commit 6b01e9bf87)
- Improve generated HTML by updating parser which includes fixes for
single "'" and single "|":
https://github.com/neovim/tree-sitter-vimdoc/pull/31
- Updated parser also fixes the conceal issue for "help" highlight
queries https://github.com/neovim/tree-sitter-vimdoc/issues/23 by
NOT including whitespace in nodes.
- But this means we need to restore the getws() function which scrapes
leading whitespace from the original input (buffer).
(cherry picked from commit a7a83bc4c2)
fix: incorrect :help tag
vim.lsp.format() doesn't exist, which causes functionaltest to fail.
Change to vim.lsp.buf.format().
(cherry picked from commit 29a7f92e2e)
Co-authored-by: dundargoc <gocdundar@gmail.com>
docs: add vim APIs to deprecated.txt
Add vim.lsp.buf.formatting() to deprecated.txt.
Add vim.lsp.buf.range_formatting() to deprecated.txt.
(cherry picked from commit a99669df1c)
Co-authored-by: steventhorne <steven.thorne91@gmail.com>
fix(runtime): properly rely on t_Co for colorschemes
Problem: check for available colors failed
Solution: simply trust t_Co, which is always available
(cherry picked from commit 5dbc713de7)
Co-authored-by: Christian Clason <c.clason@uni-graz.at>