Problem:
Currently, there's no way to distinguish progress messages coming from
different sources. Nor can Progress event be easily filtered based on
source.
Solution:
- Add "source" field to nvim_echo-opts.
- The Progress event pattern is now defined by the "source" field.
- Include the "title" as ev.data.
- Unrelated change: set force=false to disable nesting.
vim-patch:9.2.0234: test: Test_close_handle() is flaky
vim-patch:a603175c6 runtime(manpager): use \x07 instead of \a for BEL in OSC 8 regex
vim-patch:9.2.0245: xxd: color output detection is broken
vim-patch:9.2.0247: popup: popups may not wrap as expected
vim-patch:e09000a78 runtime(doc): Update examples in xxd.1 manpage
vim-patch:be7ef8a19 translation(it): Update Italian xxd man page
vim-patch:9.2.0242: memory leak in check_for_cryptkey()
vim-patch:9.2.0243: memory leak in change_indent()
vim-patch:9.2.0244: memory leak in eval8()
vim-patch:9.2.0246: memory leak in globpath()
Problem:
The temp_dict in `do_autocmd_progress()` is sized 7, but the max is 6 (id, text, percent, status, title, data). The extra capacity is rather misleading.
Solution:
make the size of the dict 6.
Problem:
- Small error in port of v9.1.0678, causing :ball to check w_locked for the
wrong window.
- After #27439, free_all_mem() may not wipe out buffers that were open in more
than one window before windows were freed.
Solution:
- Check win_locked() for wp in ex_buffer_all(), not curwin.
- Set b_nwindows to 0 in free_all_mem() before calling close_buffer().
Ref: https://github.com/neovim/neovim/pull/38473#issuecomment-4125117681
No need to block these fixes on that.
free_all_mem() change also looks like it fixed the existing "N lua references were
leaked!" warnings on the CI.
Problem: nvim_set_hl always replaces all attributes.
Solution: Add update field. When true, merge with existing
attributes instead of replacing. Unspecified attributes are preserved.
If highlight group doesn't exist, falls back to reset mode.
Problem:
Currently same progress stat get's displayed on statusline of all
windows. This is repeatitive and noisy.
Solultion:
Only display progress-status on the focused window
Problem:
Currently, when multiple progress are on going we show it as Progress:
{N} items {percent}% format. It can be simplified sinnce items doesn't
really add enough value for the valuable space it takes in statusline
Solution:
Change format to Progress: {percent}%({N})
Problem: Compiler warning in strings.c
(Timothy Rice, after v9.2.0031)
Solution: Return early when str_m is zero
(Hirohito Higashi)
fixes: vim/vim#19795closes: vim/vim#19800347e8c1e7d
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Problem:
Flow layout looks better on neovim.io. Nvim-owned help files should
switch to the new layout. Also lua-bit.txt doesn't use the same format
for function documentation as the other docs (such as api.txt).
Solution:
Switch to new layout. Tweak the function documentation to be in line
with the other docs style.
Problem:
`vim.keymap.*.Opts.buf` allows `boolean` aliases for more widely
used `integer?` values, `true` -> `0` and `false` -> `nil`. This
conversion is unnecessary and can be handled at call sites.
Solution:
As a follow-up to deprecating the `buffer` option, drop support for
boolean values for the new `buf` option. The deprecated `buffer`
continues to support booleans for backward compatibility.
vim-patch:9.2.0166: Coverity warning for potential NULL dereference
vim-patch:9.2.0170: channel: some issues in ch_listen()
vim-patch:9.2.0173: tests: Test_balloon_eval_term_visual is flaky
vim-patch:9.2.0177: Vim9: Can set environment variables in restricted mode
vim-patch:9.2.0183: channel: using deprecated networking APIs
vim-patch:9.2.0187: MS-Windows: rendering artifacts with DirectX renderer
vim-patch:2b70de167 CI: bump actions/upload-artifact to v7
vim-patch:a907a7f73 runtime(doc): disable color codes when generating ascii man pages in Makefile
vim-patch:c9e5aeff3 runtime(doc): Update Italian xxd manpage
vim-patch:9.2.0210: tests: Test_xxd tests are failing
vim-patch:9774651ec runtime(manpager): Strip OSC 8 hyperlink sequences in manpager plugin
vim-patch:9.2.0220: MS-Windows: some defined cannot be set on Cygwin/Mingw
vim-patch:9.2.0224: channel: 2 issues with out/err callbacks
vim-patch:243dcd1bc translation(it): Update Italian xxd man page
vim-patch:9.2.0230: popup: opacity not working accross vert splits
vim-patch:9.2.0231: Amiga: Link error for missing HAVE_LOCALE_H
vim-patch:9.2.0176: external diff is allowed in restricted mode
vim-patch:9.2.0188: Can set environment variables in restricted mode
vim-patch:9.2.0191: feat(has): add support for 'android' and 'termux' feature flags
Problem:
The "tohtml" plugin is loaded by default.
Solution:
- Move it to `pack/dist/opt/nvim.tohtml/`, it is an "opt-in" plugin now.
- Document guidelines.
- Also revert the `plugin/` locations of `spellfile.lua` and `net.lua`.
That idea was not worth the trouble, it will be too much re-education
for too little gain.
Problem: Option handling for key:value suboptions is limited
Solution: Improve :set+=, :set-= and :set^= for options that use
"key:value" pairs (Hirohito Higashi)
For comma-separated options with P_COLON (e.g., diffopt, listchars,
fillchars), :set += -= ^= now processes each comma-separated item
individually instead of treating the whole value as a single string.
For :set += and :set ^=:
- A "key:value" item where the key already exists with a different value:
the old item is replaced.
- An exact duplicate item is left unchanged.
- A new item is appended (+=) or prepended (^=).
For :set -=:
- A "key:value" or "key:" item removes by key match regardless of value.
- A non-colon item removes by exact match.
This also handles multiple non-colon items (e.g., :set
diffopt-=filler,internal) by processing each item individually, making
the behavior order-independent.
Previously, :set += simply appended the value, causing duplicate keys to
accumulate.
fixes: vim/vim#18495closes: vim/vim#19783e2f4e18437
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: No 'incsearch' highlighting support for :uniq
Solution: Add :uniq support (Hirohito Higashi)
closes: vim/vim#1978048137e4e48
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Problem: "zb" scrolls incorrectly with cursor on fold.
Solution: Set w_botline to the line below the fold (zeertzjq).
related: neovim/neovim#38413
closes: vim/vim#197855a3b75d67b
Problem:
List items separated by blank lines are wrapped in "blocks", then the
html generator does not treat them as contiguous list-items, and the
browser shows the list as "1. 1. 1." instead of "1. 2. 3.".
Solution:
- When generating a list-item, check if the last child of the previous
block was a list-item, and merge them together.
- Massage the help source.
fix#37220
Problem:
libmpack encodes boundary values -129 and -32769 with wrong integer
sizes:
- -129 as int8 instead of int16
- -32769 as int16 instead of int32
because the boundary checks compare against the wrong values (e.g., lo
< 0xffffff7f instead of lo < 0xffffff80). This caused data corruption:
-129 would decode as 127.
Solution:
Fix off-by-one errors in the two's complement boundary constants:
0xffffff80 (-128, min int8) and 0xffff8000 (-32768, min int16).
Fixes#37202
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
The `buffer` option remains functional but is now undocumented.
Providing both will raise an error. Since providing `buf` was disallowed
before, there is no code that will break due to using `buffer` alongside
`buf`.
Problem: call stack can be corrupted, because calculated remaining
capacity for call stack string can underflow (after v9.1.1983)
Solution: Calculate capacity against maximum capacity
(Sergey Vlasov).
closes: vim/vim#197598e0483c2f4
Co-authored-by: Sergey Vlasov <sergey@vlasov.me>
Problem:
Default statusline doesn't show progress status.
Solution:
- Provide `vim.ui.progress_status()`.
- Include it in the default 'statusline'.
How it works:
Status text summarizes "running" progress messages.
- If none: returns empty string
- If one running item: "title: percent%"
- If multiple running items: "Progress: N items avg-percent%"
Problem:
Terminal refresh may be missed if buffer update callbacks poll for uv
events. Example test failure on FreeBSD:
FAILED test/functional/terminal/buffer_spec.lua @ 1049: :terminal buffer scrollback is correct if buffer update callbacks poll for uv events
test/functional/terminal/buffer_spec.lua:1004: Row 1 did not match.
Expected:
|*19995: TEST{MATCH: +}|
|*19996: TEST{MATCH: +}|
|*19997: TEST{MATCH: +}|
|*19998: TEST{MATCH: +}|
|*19999: TEST{MATCH: +}|
|^[Process exited 0] |
|{5:-- TERMINAL --} |
Actual:
|*19696: TEST |
|*19697: TEST |
|*19698: TEST |
|*19699: TEST |
|*19700: TEST |
|^[Process exited 0] |
|{5:-- TERMINAL --} |
Solution:
Call changed_lines() after resetting invalid region in refresh_screen().
Handle terminal being invalidated in the middle of refresh_timer_cb().
Problem: Vim may freeze if setcmdline() is called while the wildmenu or
cmdline popup menu is active (rendcrx)
Solution: Cleanup completion state if cmdbuff_replaced flag has been set
(Yasuhiro Matsumoto)
fixes: vim/vim#19742closes: vim/vim#19744332dd22ed4
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Problem: The glob() function on Unix-like systems does not escape
newline characters when expanding wildcards. A maliciously
crafted string containing '\n' can be used as a command
separator to execute arbitrary shell commands via
mch_expand_wildcards(). This depends on the user's 'shell'
setting.
Solution: Add the newline character ('\n') to the SHELL_SPECIAL
definition to ensure it is properly escaped before being
passed to the shell (pyllyukko).
closes: vim/vim#19746
Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-w5jw-f54h-x46c645ed6597d
Co-authored-by: pyllyukko <pyllyukko@maimed.org>
Problem:
Mouse popup menus (right-click context menus) do not respect the
'pumborder' option and could overflow screen boundaries when borders
were enabled near the edge.
Solution:
- Remove the mouse menu exclusion from border rendering.
- Add boundary check to shift menu left when border would exceed screen
width, ensuring complete visibility of menu content and borders.
Problem: using copy_option_part() can be improved
Solution: Refactor and use the return value of copy_option_part() to
avoid strlen() calls (John Marriott).
In addition, this commit includes the following changes:
memline.c:
- In recover_names():
- Replace calls to vim_strsave() with vim_strnsave() for the literal
strings
- Use a string_T to store local variable dir_name.
bufwrite.c:
- In buf_write()
- move variable wp to where it is used.
help.c:
- In fix_help_buffer():
- replace call to add_pathsep() with after_pathsep()
optionstr.c:
- In export_myvimdir():
- use a string_T to store local variable buf
- replace call to add_pathsep() with after_pathsep()
scriptfile.c:
- In do_in_path():
- use a string_T to store local variable buf
- measure the lengths of prefix and name once before the while loop
- replace call to add_pathsep() with after_pathsep()
- move some variables closer to where they are used
spellfile.c:
- In init_spellfile():
- use a string_T to store local variable buf
closes: vim/vim#19725a74e5fc5b9
Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem:
If buffer update callbacks poll for uv events during terminal scrollback
refresh, new output from PTY process may lead to incorrect scrollback.
Solution:
Don't poll for output to the same terminal as the one being refreshed.
Problem:
`nvim_echo(…, {id=…})` accepts user-defined id as a string or integer.
Generated ids are always higher than last highest msg-id used. Thus
plugins may accidentally advance the integer id "address space", which,
at minimum, could lead to confusion when troubleshooting, or in the
worst case, could overflow or "exhaust" the id address space.
There's no use-case for it, and it could be the mildly confusing, so we
should just disallow it.
Solution:
Disallow *integer* user-defined message-id.
Only allow *string* user-defined message-id.
Problem:
nvim_get_option_value with "filetype" set silently returns incorrect
defaults if autocommands are blocked, like when they're already running.
Solution:
Allow its FileType autocommands to nest: `do_filetype_autocmd(force=true)`.
Also error if executing them fails, rather than silently return wrong defaults.
Endless nesting from misbehaving scripts should be prevented by the recursion
limit in apply_autocmds_group, which is 10.
Problem:
On windows, if a drive-relative path doesn't contain a slash,
`path_to_absolute` can't split out the relative component, causing
expansion to fails. e.g., `c:` `c:.` `c:..` `c:foo.md`
Solution:
For these cases, we can pass letter and colon to `path_full_dir_name`.
Notably, `..` is included as well.
if that relative path exists, it can be expanded correctly.
Problem:
Right-click menu fails with E335 when using V in Insert mode (after
i_ctrl-o). The mode detection checks restart_edit before VIsual_active,
incorrectly selecting Insert mode binding even when Visual mode is
active.
Solution:
Check Visual mode before Insert mode, to match get_menu_mode() priority
order.