fix(ui2): prevent <CR> from focusing pager in insert/terminal mode
Problem: <CR> in insert/terminal mode can focus pager unexpectedly.
Solution: Don't enter the pager when <CR> is pressed during expanded
cmdline in insert/terminal mode.
Problem: When entering the cmdline below expanded messages, those
messages are moved to the dialog window. The dialog window
supports paging but that is unexpected in this situation where
it just serves to keep (some of, exactly those that were
visible before the cmdline was entered) the messages visible.
Wrong highlight group for dialog "more" message.
Solution: Don't create the `vim.on_key()` dialog pager callback after
entering the cmdline below expanded messages.
Use the MsgMore highlight group for the paging hint title.
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:
Currently we are using
if 1 item then
{title}: {percent}%
else
Progress: {AVG}%({N})
dropping {title} and Progress text saves up space in statusline plus makes the format consistent, less jumping around.
Solution:
Use `{AVG}%({N})` for all cases.
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:
The fold refresh path for foldminlines/foldnestmax creates a new
FoldInfo and starts an async parse. If FileType or BufUnload re-enters
before that callback returns, foldinfos[bufnr] can be cleared or
replaced. The callback then indexes a stale slot and raises an "attempt
to index a nil value" error.
Solution:
Capture the FoldInfo created for the refresh and carry that object
through the async callback. Before calling foldupdate(), verify that the
buffer still points at the same FoldInfo generation; otherwise ignore
the stale callback.
AI-assisted: Codex
Fixes#38461
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: Changing the 'signcolumn' may cause flicker, because it uses
the P_RCLR flag for redrawing (Yggdroot)
Solution: Change 'signcolumn' to use P_RWIN instead of P_RCLR, matching
the behavior of 'number' and 'foldcolumn'
(Yasuhiro Matsumoto).
fixes: vim/vim#19663closes: vim/vim#197134292eea714
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
- Highlight keywords "function" and "namespace" with
the "Keyword" group ("shFunctionKey").
- Highlight function body delimiters "{" and "}" with the
"Delimiter" group ("shFunctionExprRegion").
- Highlight function body delimiters "(" and ")" with the
"Operator" group ("shFunctionSubShRegion").
- Also, follow one style in folding all supported variants
of function bodies for grouping commands too by enclosing
a delimited function body, e.g. "{" and "}", in a fold and
leaving its function header, e.g. "function f()", out of
it when the header is written on a separate line.
To restore previous colouring, add to "after/syntax/sh.vim":
------------------------------------------------------------
hi link shFunctionKey Function
hi link shFunctionExprRegion Function
hi link shFunctionSubShRegion Function
------------------------------------------------------------
fixes: https://github.com/vim/vim/pull/19638#issuecomment-4052635546closes: vim/vim#19638955c02dff7
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Problem: JSON files should end with a trailing newline so that Unix
tools work as expected, Git doesn't report "No newline at end of file"
and to avoid noise in diffs from editors and other tools adding the
missing newline.
Solution: Add trailing newline.
Problem: - With expanded messages exceeding cfg.msg.cmd.height, entering
the cmdline scrolls to the bottom and expands to the full "cmd"
buffer text height.
- Cursor in the pager is not always at the last message and at
the bottom of the window when appending to the pager.
- unreliable test: messages2_spec: "closed msg window timer removes
empty lines".
Solution: - Achieve separation of the cmdline and message text by moving
messages to the dialog window when entering the cmdline below
expanded messages.
- Set cursor to start of the first message only when first
entering the pager. Use `norm! zb` to position last message
at the bottom of the window (which shouldn't crash anymore
since 911337eb).
- Increase cfg.msg.msg.timeout used in the test file.
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:
on_response(err, response) handler doesn't receive a response when an
output buffer or path is supplied to vim.net.request. User might want to
both output output to a file/buffer and also do something with it on
response.
Solution:
If an on_response handler was given, then pass the response to it.
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:
Non-trivial to write output of vim.net.request to buffer. Requires extra
code in plugin/net.lua which can't be reused by other plugin authors.
```
vim.net.request('https://neovim.io', {}, function(err, res)
if not err then
local buf = vim.api.nvim_create_buf(true, false)
if res then
local lines = vim.split(res.body, '\n', { plain = true })
vim.api.nvim_buf_set_lines(buf, 0, -1, true, lines)
end
end
end)
```
Solution:
Accept an optional `outbuf` argument to indicate the buffer to write output
to, similar to `outpath`.
vim.net.request('https://neovim.io', { outbuf = buf })
Other fixes / followups:
- Make plugin/net.lua smaller
- Return objection with close() method
- vim.net.request.Opts class
- vim.validate single calls
- Use (''):format(...) instead of `..`
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: clangd prepends a space/bullet indicator to label. With
labelDetailsSupport enabled, the signature moves to labelDetails,
making label shorter. This flips the length comparison in
get_completion_word, causing it to use item.label directly and
insert the indicator into the buffer.
Solution: only prefer filterText over label when label starts with non-keyword
character in get_completion_word fallback branch.
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.
Problem: Generating snippet preview in get_doc() populated the
documentation field before resolve, so the resolve request was
never sent.
Solution: Move snippet preview logic into on_completechanged and
the resolve callback so it no longer blocks the resolve request.
Problem: `vim.lsp.enable()` skips all buffers with non-empty `buftype`,
including `help` buffers. LSPs targeting `filetype='help'` never
auto-attach despite help buffers being real files.
Solution: Expand the `buftype` guard in `lsp_enable_callback` to allow
`help` alongside `""`.
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.