Problem:
The existing `showmode` overlay can immediately cover messages emitted while
Visual mode is active, including the `g CTRL-G` word count.
Solution:
Protect Visual mode messages with the existing message delay and temporarily
hide the previous last-line overlay until it is restored.
Problem:
FAILED …/cursorhold_spec.lua @ 73: CursorHold is not triggered after only K_EVENT on startup
Expected values to be equal.
Expected:
1
Actual:
0
stack traceback:
…/cursorhold_spec.lua:79: in function <…/cursorhold_spec.lua:73>
Solution:
Retry instead of hardcoding sleep(50).
Problem:
LSP hover erroneously drops blank lines before a 4-space-indented
codeblock, which is not valid Markdown. This causes incorrect parsing
and wrong display.
Solution:
Fix `split_lines` so that it doesn't drop the blank line just before
a 4-space-indented codeblock.
fix https://github.com/neovim/neovim/issues/40860
Problem:
w_float_is_info conflates a window's role with its floating layout,
which are orthogonal properties.
Solution:
Replace w_float_is_info with a w_kind enum for the window's role.
Problem:
`vim.diagnostic.handlers.underline.show` throws `E565: Index out of bounds` when
it tries to underline a diagnostic whose `lnum` is past the end of the buffer.
This happens with stale diagnostics set on an unloaded buffer (e.g. via
`bufadd()`) that are drawn only after the buffer is loaded: by then the file on
disk can be shorter than the `lnum` the diagnostic carried. File pickers
(snacks.nvim) that open files via `bufadd` + `:buffer` hit this whenever an LSP
server has already emitted diagnostics for that URI.
Solution:
Skip diagnostics with an out-of-range `lnum` in the underline handler.
Other handlers `M.virtual_text.show()`, `M.signs.show()`, have a similar condition.
Problem:
The list-item indentation logic in `gen_help_html.lua` tracks `opt.indent` that
only decrements by one level when a list item is less indented than its sibling.
Dedenting across multiple nesting levels at once produces the wrong left margin.
Solution:
Track the exact leading whitespace for each indent level in a `opt.indent_ws` stack:
- On reset or a top-level item initialize the stack with the current item's
whitespace.
- When indenting deeper push the current whitespace at the new level.
- When dedenting pop every level whose tracked whitespace is deeper than the
current item (reaching the correct ancestor level).
Problem:
A floating preview window (hover, signature help) converted to a normal
window (e.g. with CTRL-W_H or nvim_win_set_config()) is still closed by
the open_floating_preview() autocommands, and a later preview may focus
or close it as if it were still a float.
Solution:
When the preview window is no longer floating, remove its auto-close
autocommands and stop tracking it as the buffer's floating preview.
Closes#36659
Problem: ml_get error when changing hidden buffer in Python.
Solution: Block updating folds. (closesvim/vim#7598)
----
"ctx_switch()", "ctx_restore()" obsolete "switch_buffer()" and
"restore_buffer()".
Latter are unused since https://github.com/neovim/neovim/pull/15831.
Mark them as N/A (until some test fails).
----
3e0107ea16
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problems:
On Windows, `:w somedir` (where somedir is an existing directory
in pwd) shows the misleading `E13: File exists (add ! to override)`
instead of `E17: "somedir" is a directory`.
Solution:
drop unnecessary `#ifdef` guard.
Problem: when PR #40621 removed a 50 cell restriction to item group
minwid, a possible integer overflow was introduced when the added
padding is multiplied with the number of fillchar bytes.
Solution: when there is not enough buffer capacity left, reduce the
number of added fillchars before calculating the number of added bytes.
Problem:
We have 5 "labeler" jobs, this is kind of nuts, it bloats the CI report,
and also introduces race conditions...
Solution:
Merge 3 jobs into 1 `label` job with multiple sequential steps.
- Eliminates the `needs` chain
- Drops unused `contents:write` permission.
- GITHUB_TOKEN is scoped to the single `gh` step.
- Note: is the automatic job token (`contents:read` + `pull-requests:write`,
not a PAT), so worst case is PR/label mischief.
The `ai-assisted` and `request-reviewer` jobs stay separate, bc they are
triggered on different events (not only "opened").
Problem:
Mysterious Windows CI failure points to resource exhaustion, but we have
no visibility/instrumentation:
RUN T610 nvim_set_keymap, nvim_del_keymap can set mappings with special characters, lhs: <S-Left>, rhs: <S-Left>: 93.70 ms OK
RUN T611 nvim_set_keymap, nvim_del_keymap can set mappings with special characters, lhs: <S-Left>, rhs: <F12><F2><Tab>: 49.48 ms FAIL
…\testnvim.lua:144: EOF was received from Nvim. Likely the Nvim process crashed.
stack traceback:
D:/a/neovim/neovim/test/functional/testnvim.lua:144: in function 'nvim_set_keymap'
…/api/keymap_spec.lua:769: in function <…/api/keymap_spec.lua:768>
RUN T612 nvim_set_keymap, nvim_del_keymap can set mappings with special characters, lhs: <S-Left>, rhs: <Space><Tab>: 18.49 ms FAIL
…\testnvim.lua:144: EOF was received from Nvim. Likely the Nvim process crashed.
stack traceback:
D:/a/neovim/neovim/test/functional/testnvim.lua:144: in function 'nvim_set_keymap'
…/api/keymap_spec.lua:769: in function <.../build/Xtest_xdg_api/test/functional/api/keymap_spec.lua:768>
Solution:
Append the child exit-code and signal to the "EOF … crashed" message.
Example:
Nvim EOF (crash?) exit code: 42 (0x0000002A)
On the next failing Windows run, the first crash line will classify the failure:
- 0xC0000005 → access violation (nvim bug)
- 0xC0000374 → heap corruption (nvim bug)
- spawn/resource error or "clean" exit-code → system resource exhaustion
Problem:
nvim_create_autocmd() isn't |api-fast|, so modules that create autocmds
(e.g. vim.treesitter.query) can't be require()d in a fast event context.
Solution:
Mark it |api-fast|. Compile autocmd patterns with RE_NOBREAK so
aucmd_next() won't os_breakcheck() mid-iteration, where a fast
nvim_create_autocmd() could realloc the autocmds vector and dangle the
caller's AutoPat/AutoCmd.
RE_NOBREAK is low-risk because:
- aucmd_next()'s loop checks CTRL-C: `(for (… i < apc->ausize && !got_int; …)`.
- `line_breakcheck()` (`autocmd.c:1912`) runs once per matched autocmd.
- Each autocmd _execution_ runs through `do_cmdline`, which has its own
breakchecks.
However this does admit risk of a pathological case:
a catastrophic-backtracking glob matched against a very long `User`
event-pattern.
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Problem:
Float border highlight groups (FloatBorder, FloatTitle and FloatFooter)
fall back to Normal background highlight if no background color set.
Solution:
Combine border colors with window-local Normal highlight.
Fix#38330
vim-patch:8.2.4945: inconsistent use of white space
vim-patch:9.0.1590: filetype test has trailing white space
vim-patch:9.0.1916: Crash when allocating large terminal screen
vim-patch:d086b8f64 runtime(doc): fix inconsistent indent (#14089)
vim-patch:59356019e runtime(doc): align command line table
vim-patch:112505104 runtime(doc): CI: remove trailing white space in documentation
vim-patch:3ca914ec7 runtime(doc): Tweak documentation style a bit
vim-patch:9.1.1352: style: inconsistent indent in insexpand.c
vim-patch:9.1.1363: style: inconsistent indentation in various files
vim-patch:9.1.1366: v9.1.1364 unintentionally changed sign.c and sound.c
vim-patch:45b59a92c runtime(doc): remove trailing whitespace from example in builtin.txt
vim-patch:9.2.0003: tests: invalid indent in message.c
vim-patch:467fe6581 CI: Bump the github-actions group across 1 directory with 2 updates
vim-patch:9.2.0798: Memory leak in compile_expr6() on alloc failure
vim-patch:9.2.0799: Memory leak in compile_def_function_body() on alloc failure
Co-authored-by: marvim <marvim@users.noreply.github.com>
Problem: Vim9: has() assumes a feature does not change dynamically.
Solution: Check whether a feature may change dynamically. (closesvim/vim#7265)
----
"dynamic_feature()" is only for vim9script which is N/A.
----
8cebd43e97
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Note this doesn't find new N/A patches by itself
and this is to align with ':h dev-vimpatch'.
Neovim refactored Vim's "char/string" functions to be either safer
(ie. xstrlcat) or target Unicode.
Note this doesn't find new N/A patches by itself
and this is to align with ':h dev-vimpatch'.
I use the 'vim_na_*' files to debug the filtered diff of files
that seem N/A but contain relevant code.
I can't blacklist the entire file.
Problems:
1. Can't get individual parts of a key-chord separately: modifiers, key.
2. Can't separate a key-combo into individual key-chords.
Solution:
Enhance `vim.keycode()` to optionally return a structured parse result
as a list of key-chords:
- `key_raw` the key-chord (problem 2)
- `mod` the modifiers of `key_raw` (problem 1)
- `key_orig` the key part of the key-chord, only here if differing from `key`
(this doesn't solve any of the above mentioned problems, but it may provide
useful and it's (in terms of code) free)
- `key` a normalized version of `key_orig` (solving problem 1), example(the
first is `key_orig` and second is `key`): `lt` and `<`, `Bar` and `|` (in
`<C-Bar>`)
Problem: Visual block reselection wrong with 'virtualedit' when line
lengths are different (Alex Yang, after 8.2.3494).
Solution: Set the entire cursor position to old position when computing
target curswant, since the check_cursor() added in 8.2.3494
may change cursor column as well (zeertzjq).
fixes: vim/vim#20746closes: vim/vim#207488cddbfe468
Problem: extend() and extendnew() don't handle NULL expr2 properly
(Mao-Yining)
Solution: Still set the return value when expr2 is NULL (zeertzjq).
fixes: vim/vim#20758closes: vim/vim#20759e397c82a04
Problem: filetype: hip files are not recognized
Solution: Detect *.hip files as hip filetype, include filetype, syntax
and indent plugins, update makemenu.vim and synmenu.vim (Young)
Round out HIP (Heterogeneous-compute Interface for Portability) support
to mirror the existing CUDA files:
- autoload/dist/ft.vim: detect the ".hip" extension as filetype "hip"
- ftplugin/hip.vim: behave like C++ by sourcing ftplugin/cpp.vim
- indent/hip.vim: use cindent, like indent/cuda.vim
- makemenu.vim / synmenu.vim: add a Syntax menu entry
The syntax/hip.vim file already sources syntax/cpp.vim and adds the
HIP-specific keywords, matching syntax/cuda.vim.
closes: vim/vim#20773b3ad239038
Co-authored-by: Young <young20050727@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Problem:
FAILED …/put_spec.lua:894: …/put_spec.lua @ 898: put command . register special tests should ring the bell when deleting if not appropriate
…/put_spec.lua:894: …/put_spec.lua:898: Bell was not rung after action
Snapshot:
screen:expect([[
^ine of words 1 |
Line of words 2 |
{1:~ }|*4
{3:[No Name] [+] }|
|
{1:~ }|*4
{UNKNOWN_HL_ID(4):[No Name] }|
{UNKNOWN_HL_ID(1): }|
]])
stack traceback:
…/ui/screen.lua:917: in function '_wait'
…/ui/screen.lua:540: in function 'expect'
…/editor/put_spec.lua:894: in function 'bell_test'
…/editor/put_spec.lua:940: in function <…/editor/put_spec.lua:932>
Analysis:
The bell was asserted via the UI 'bell' event (screen.bell), but
vim_beep() rate-limits that to 3 per 500ms. These tests share one
long-lived session, so beeps from earlier tests could exhaust the window
and drop the asserted beep.
Solution:
Use assert_beeps()/assert_nobeep(), which check called_vim_beep (set
before the rate-limit gate).
Problem:
Sampling a transient busy=1 pulse is racy under load.
Solution:
Set a long debounce, assert the stable state, then use a short debounce
to let the reload clear it.
vim-patch:98056533b Vim 8.2 release
vim-patch:495282b6e Correct list of patch numbers
vim-patch:85d9b03f8 Correct list of patches.
vim-patch:8.2.2598: Vim9: :open does not need to be supported
vim-patch:8.2.4606: test fails because of changed error message
vim-patch:9.0.0014: missing part of the test override change
vim-patch:9.0.0515: virtual text highlight starts too early when 'number' is set
vim-patch:9.0.0516: virtual text "above" highlights gap after it
vim-patch:9.0.0518: virtual text highlight starts too early with 'nowrap'
vim-patch:9.0.0698: VisVim is outdated, does not work with current Visual Studio
vim-patch:9.0.0833: Mac: no +sound feature in huge build
vim-patch:9.0.1124: virtual text at a column position is truncated
vim-patch:9.0.1463: virtual text truncation only works with Unicode 'encoding'
vim-patch:9.0.1482: crash when textprop has a very large "padding" value
vim-patch:9.0.1695: Crash with overlong textprop above
vim-patch:9.1.0139: MS-Windows: ligatures map cleared on startup
vim-patch:9.1.0368: MS-Windows: Hard to define the Vim Patchlevel with leading zeroes
vim-patch:20393bc02 runtime(doc): update last change date for diff.txt
vim-patch:c49cb93a8 patch 9.1.1392: missing patch number
vim-patch:9.1.1397: tabpanel not correctly updated on :tabonly
vim-patch:9.1.1530: Missing version change in v9.1.1529
vim-patch:689f3bf31 runtime(doc): clarify C99 constraints and portability assumptions
vim-patch:9.1.1589: Cannot disable cscope interface using configure
vim-patch:9.1.1637: FEAT_DIFF used in diff.pro
vim-patch:2d4eb6ee1 runtime(doc): Remove dead link from todo.txt
vim-patch:6d8307fc2 runtime(doc): Add a Development policy
vim-patch:9.1.1982: Use after free with redraw_listener_add()
vim-patch:9.1.2084: Compile error when build with job feature
vim-patch:9.1.2115: CI: wrong preprocessor indentation
vim-patch:9.2.0764: Compiler warning about unused function
vim-patch:b212f440a CI: Bump the github-actions group across 1 directory with 2 updates
Co-authored-by: marvim <marvim@users.noreply.github.com>