Problem: Sometimes automatic lockfile synchronization after `:restart`
might fail, like due to bad/absent Internet connection. This would
remove failed to install entries from the lockfile (since they are not
on disk and lockfile is meant to lock the latest plugin version on
disk).
Solution: Document that this should be treated as an unwanted update and
use steps similar to "Revert plugin after an update" use case.
Problem: Using severity names (like "ERROR", "WARN") in functions like
`vim.diganostic.get()` and `vim.diagnostic.config()` is allowed and
tested for many years now. But documentation about it can be clearer.
Solution: Explicitly mention that severity names are allowed in some
situations. Ideally, it would also require updating typing for
`vim.diagnostic.SeverityFilter`, but that looks problematic to do
robustly.
Problem: Unreliable test on Windows which sometimes fails with too many
failed retries.
Solution: Increase timeout in hopes that it will be enough to make it
pass more frequently. This should not affect fast and already working
platforms.
Problem:
Naming conventions are not automatically checked.
Solution:
Add a check to the doc generator. Eventually we should extract this
somehow, but that will require refactoring the doc generator...
Note: this also checks non-public functions, basically anything that
passes through `gen_eval_files.lua` and `gen_vimdoc.lua`. And that's
a good thing.
Problem: When closing floating windows to close a tabpage, if the current
buffer will unload, buffers contained in those floating windows
will too (unexpectedly).
Solution: Don't pass along "free_buf" argument; check 'bufhidden' for
the buffer in the to be closed float.
Problem:
Several zh_CN translations were marked fuzzy with wrong or placeholder msgstr.
Solution:
Fix fuzzy entries, preserve format specifiers, use full-width punctuation.
Problem: Treesitter highlighting regressed on 32-bit builds because ranges that should cover the whole buffer were corrupted when passed into Lua.
Solution: Round-trip those range values through Lua and validate them so treesitter sees the same ranges on 32 and 64-bit builds.
Problem
Some variables use the wrong type (ClientToServer instead of ServerToClient)
and some use vaguer types that could be more strict.
Solution
Use the correct types.
Problem: repeat_string() can be improved
Solution: Replace the for() loop by an exponential growing while loop
(Yasuhiro Matsumoto)
closes: vim/vim#19977bfa46a52f6
Cherry-pick f_repeat() refactor from patch 9.1.1232.
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Problem: filetype: not all Bitbake include files are recognized
Solution: Enhance the file detection logic and consider varflags
(Martin Schwan)
closes: vim/vim#199830e02be1919
Co-authored-by: Martin Schwan <m.schwan@phytec.de>
Enable syntax highlighting for forward-slashes in Bitbake variables with
varflags. Bitbake allows for forward-slashes in both the variable name
and their potential varflags. E.g. the following should match:
FOO_BAR[baz] = "foobar"
FOO_BAR_foo/bar[baz] = "foobar"
FOO_BAR_foo/bar[baz/bazzer] = "foobar"
Also allow plus-signs in variable names, to be in line with normal
variable names.
related: vim/vim#199832041478e2a
Co-authored-by: Martin Schwan <m.schwan@phytec.de>
Problem: runtime(tar): missing path traversal checks in tar#Extract()
Solution: Add check for leading slash, however gnu tar should already
detect this (q1uf3ng)
tar#Extract() did not check for ../ sequences or absolute paths,
unlike zip#Extract() which was patched in recent commits. Add the
same checks: ../ (relative traversal), leading slash (Unix), drive
letter and UNC/leading slash (Windows).
closes: vim/vim#19981490b737f3e
Co-authored-by: q1uf3ng <q1uf3ng@protone.me>
zip#Write(): the Windows path check did not match a single leading
slash (/path), which resolves to the current drive root on Windows.
Simplify the regex to match any leading slash or backslash.
zip#Extract(): add absolute path checks for both Unix and Windows,
matching the existing checks in zip#Write().
closes: vim/vim#19976351a16c88f
Co-authored-by: q1uf3ng <q1uf3ng@protone.me>
Problem:
The window opened by `vim.lsp.util.open_floating_preview()`
allows its buffer to be switched. Presumably that only happens
by accident and is disorienting.
Solution:
Set 'winfixbuf' in the open_floating_preview() window.
continues d0af4cd909.
This commit renames positional parameters. This is only "cosmetic", but
is intended to make it extra clear which name is preferred, since people
often copy existing code despite the guidelines in `:help dev-naming`.
Problem:
To support `collapsedText`, which allows the LSP server to determine the
content of the foldtext, we provided `vim.lsp.foldtext()`. However, such
content does not have highlighting.
Solution
Treat the filetype of `collapsedText` as the filetype of the corresponding
buffer and use tree-sitter to highlight it.
In 3a4a66017b, 4d3a67cd62, df8d98173c we renamed "buffer" to "buf"
in dict parameters and return-values.
This commit renames positional parameters. This is only "cosmetic", but
is intended to make it extra clear which name is preferred, since people
often copy existing code despite the guidelines in `:help dev-naming`.
Extract the diagnostic implementation from
runtime/lua/vim/diagnostic.lua into focused internal modules covering
config, display, float rendering, jump/list helpers, namespace and
storage management, severity/shared utilities, and statusline support.
Move the builtin handlers into runtime/lua/vim/diagnostic/handlers/ and
keep runtime/lua/vim/diagnostic.lua as the public facade that lazily
dispatches to the split modules. This preserves the external
vim.diagnostic API while making the implementation easier to navigate
and reason about.
AI-assisted: Codex
Replace the busted-based Lua test runner with a repo-local harness.
The new harness runs spec files directly under `nvim -ll`, ships its own
reporter and lightweight `luassert` shim, and keeps the helper/preload
flow used by the functional and unit test suites.
Keep the file boundary model shallow and busted-like by restoring `_G`,
`package.loaded`, `package.preload`, `arg`, and the process environment
between files, without carrying extra reset APIs or custom assertion
machinery.
Update the build and test entrypoints to use the new runner, add
black-box coverage for the harness itself, and drop the bundled
busted/luacheck dependency path.
AI-assisted: Codex
Problem: Wrong cursor position when entering command line window
Solution: Add check_cursor() command to verify the cursor position
(Hirohito Higashi).
When opening the command-line window with CTRL-F after typing a command
that fills the screen width, the cursor was placed past the end of the
line. Add check_cursor() after setting State to MODE_NORMAL so the
cursor is adjusted to the last character.
Also fix the cmdwin prefix character (e.g. ':') being drawn on wrapped
continuation rows. Draw an empty space instead so that the text
alignment is preserved.
closes: vim/vim#19964c4fe1e958a
Cherry-pick Test_wildmenu_pum() changes from patch 9.1.1995.
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: potential buffer underrun when settings statusline like option
(q1uf3ng)
Solution: Validate that p > out before accessing p[-1]
closes: vim/vim#1996191b402f575
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: tests: test_clientserver may fail on slower systems
Solution: Wait for argc() before checking argv() (James McCoy).
On slower systems, the argv() check may run before the server has
populated the arg list.
Add a wait for argc() to be 3 to be more tolerant of such systems
closes: vim/vim#199749d95410aa4
Co-authored-by: James McCoy <jamessan@jamessan.com>
Problem: tests: test_excmd.vim leaves swapfiles behind
Solution: Close open buffer using :bw!
related: vim/vim#19975c922202ea2
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Wrong autoformatting with 'autocomplete'.
Solution: Don't trigger autoformatting when ending autocompletion
without selecting an item (zeertzjq).
fixes: vim/vim#19954closes: vim/vim#19970efbd482116
Problem:
`gf` and `<cfile>` treat `file:/absolute/path` as a literal path and
open `file:/...` instead of the local file.
Solution:
Strip the local `file:` prefix before path resolution in the hyperlink
path code.
Problem: The cursor shape is changed to indicate when it is behind an
unfocused floating window (since a2b92a5e). This behavior
cannot be controlled by a floating window that doesn't want
to dim the cursor.
Solution: Assign a zindex-offset of 50 to the zindex of the current
window. To not dim the cursor when creating a floating window
on top of the current window one can assign the zindex
accordingly.
Problem:
clang-analyzer-security.PointerSub reports "Subtraction of two pointers
that do not point into the same array is undefined behavior" in the
HIKEY2SFT macro. Computing the offset of a flexible array member by
subtracting pointers from a dummy static object, is technically UB.
Solution:
Use standard `offsetof()` instead.
Co-Authored-By: Claude
Problem: clang 21 added core.FixedAddressDereference, which reports
"dereference of a fixed address (loaded from variable 'r')" in regexp.c
after xmalloc(). The analyzer doesn't model xmalloc as always returning
a valid heap pointer (it aborts on failure), so it constructs impossible
paths.
Solution: Suppress globally in the clang-analyzer cmake target.
Co-Authored-By: Claude
Problem:
clang 21 promoted alpha.security.ArrayBoundV2 to security.ArrayBound
(stable). This new check reports false-positive "out of bound access"
errors in drawline.c and vimscript.c, where the analyzer constructs
impossible paths (e.g. concealed line with draw_text=false yet ptr
advanced past the NUL terminator, or root AST node with a "next"
sibling).
Per-line NOLINT suppression doesn't work because the analyzer finds
multiple paths to the same false positive.
Solution:
Disable clang-analyzer-security.ArrayBound globally in the
clang-analyzer cmake target until the check matures.
Co-Authored-By: Claude
Problem:
On Windows, when installing nightly build via winget, often
encounter "Installer hash does not match".
Solution:
use `Invoke-WebRequest` to download the msi package, then install
it via `msiexec`.