36689 Commits

Author SHA1 Message Date
zeertzjq
d214c24129 vim-patch:9.2.0538: Cannot keep leading whitespace in %{} statusline expr (#40007)
Problem:  A leading space in the result of a %{} item is sometimes
          stripped, and an all-digit result is converted to a number.
Solution: Add %0{} atom which inserts the expression result verbatim
          (glepnir)

fixes:  vim/vim#3898
closes: vim/vim#20315

e8d7a40b98

Co-authored-by: glepnir <glephunter@gmail.com>
nightly
2026-05-26 01:04:24 +00:00
zeertzjq
13b7319bae vim-patch:9.2.0535: tests: matchit plugin is not tested (#40006)
Problem:  tests: matchit plugin is not tested
Solution: Add test_plugin_matchit, improve b:match_words for the html
          filetype plugin (Andrey Starodubtsev)

`b:match_words` which contains patterns used by `matchit` plugin to find
tag's counterpath, is fixed so that matching happens using the whole
tag, not just its first letter.

Also, it allows to find matching tag in case if there are spaces or
attributes after tag name.

fixes:  chrisbra/matchit#51
closes: vim/vim#20313

3a90b2ba8e

Co-authored-by: Andrey Starodubtsev <andrey.starodubtsev@gmail.com>
2026-05-26 08:28:08 +08:00
zeertzjq
dca80038af Merge pull request #40004 from zeertzjq/vim-9.2.0533
vim-patch:9.2.0533: '[ mark moved to end of inserted text after CTRL-R CTRL-P paste
2026-05-26 08:01:00 +08:00
zeertzjq
86b2751cad vim-patch:c175ce8: runtime(spec): Drop obsolete s:GetRelVer() function
c175ce86fa

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-26 08:00:12 +08:00
zeertzjq
3c0160c432 vim-patch:dfdeba1: runtime(vim): Update base syntax, fix mismtatched :def return type
Anchor the return type separator ':' with a lookbehind as the relevant
nextgroup options use skipwhite.

closes: vim/vim#20319

dfdeba16d7

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-05-26 08:00:12 +08:00
zeertzjq
a412a4a846 vim-patch:010a71b: runtime(zig): Update upstream repo
related: vim/vim#20312

010a71bb60

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-26 08:00:12 +08:00
zeertzjq
93ca849361 Merge pull request #40003 from zeertzjq/vim-9.2.0531
vim-patch:9.2.{0531,0536}
2026-05-26 07:39:50 +08:00
zeertzjq
13def2fa3a vim-patch:9.2.0533: '[ mark moved to end of inserted text after CTRL-R CTRL-P paste
Problem:  After CTRL-R CTRL-P (or CTRL-R CTRL-O) pastes a register
          into Insert mode, a follow-up edit such as backspace makes
          stop_arrow() rewrite Insstart with the post-paste cursor
          position.  As a result the '[ mark points at the end of the
          inserted text instead of its start  (agguser, after 9.2.0384)
Solution: In stop_arrow(), only pull Insstart back when the cursor
          moved above the previous Insstart, so a line-start backspace
          can still save the joined range (vim/vim#20031) without disturbing
          the start position for inserts that advance the cursor
          (Hirohito Higashi).

related: vim/vim#20031
fixes:   vim/vim#20130
closes:  vim/vim#20322

bc7805323f

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 07:28:38 +08:00
zeertzjq
98b2fd16f0 vim-patch:9.2.0536: tests: Test_invalid_args() fails on GTK4 without xterm_clipboard
Problem:  tests: Test_invalid_args() fails on GTK4 builds when
          xterm_clipboard is not enabled
Solution: Add has('xterm_clipboard') check to the test, while at it,
          also document the --display argument.

closes: vim/vim#20318

7e55dae2fe

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-26 07:24:55 +08:00
zeertzjq
6a2a8e66d6 vim-patch:9.2.0531: tests: Test_cd_completion() fails on MS-Windows with E344
Problem:  tests: Test_cd_completion() fails on MS-Windows with E344
Solution: Catch E344 in addition to E472 (Ken Takata)

Sometimes, Test_cd_completion fails with E344:
https://github.com/vim/vim-win32-installer/issues/446#issuecomment-4526975345

closes: vim/vim#20328

98401467a9

Co-authored-by: K.Takata <kentkt@csc.jp>
2026-05-26 07:24:21 +08:00
zeertzjq
101d19c43e Merge pull request #40000 from neovim/dependabot/github_actions/github-actions-44be538ff8
ci: bump zizmorcore/zizmor-action from 0.5.5 to 0.5.6 in the github-actions group across 1 directory
2026-05-26 07:08:06 +08:00
dependabot[bot]
3faf76b837 ci: bump zizmorcore/zizmor-action
Bumps the github-actions group with 1 update in the / directory: [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action).


Updates `zizmorcore/zizmor-action` from 0.5.5 to 0.5.6
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](a16621b09c...5f14fd08f7)

---
updated-dependencies:
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.5.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-25 18:29:09 +00:00
bfredl
2d192f3e6d Merge pull request #39920 from bfredl/luastring
fix(lua): use even safer and even better error() message conversion
2026-05-25 16:35:40 +02:00
Michał Dominiak
70792aa6e4 fix(marks): read from the correct variable in conceal_lines mark collection (#39991)
Problem:  Not using current mark for namespace check during iteration for conceal_line marks.
Solution: Use the appropriate mark variable for namespace check.
2026-05-25 11:19:26 +02:00
bfredl
24e23de721 fix(lua): use even safer and even better error() message conversion
problem:
this crashes neovim:

ondska = setmetatable({}, {__tostring = error})
error(ondska)

solution:

make it not crash neovim
2026-05-25 11:06:02 +02:00
zeertzjq
89623e5992 vim-patch:53d97c9: runtime(compiler): Remove wrong escape in zig compiler files (#39989)
closes: vim/vim#20312

53d97c93b7

Co-authored-by: bennyyip <yebenmy@gmail.com>
2026-05-24 23:05:20 +00:00
acehinnnqru
a9d7cbd722 fix(lsp): calc correct screen_width when opts.relative == 'editor' (#39977) 2026-05-24 15:00:53 -07:00
zeertzjq
dd65b4b152 vim-patch:e60d4b4: runtime(doc): update netrws "mt" command description (#39975)
fixes: vim/vim#20302

e60d4b4ff3

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-24 18:52:59 +08:00
zeertzjq
3b47e90349 Merge pull request #39974 from zeertzjq/vim-9.2.0524
vim-patch:9.2.{0524,0525}
2026-05-24 18:16:44 +08:00
zeertzjq
01a21ec5b6 vim-patch:9.2.0525: spell: memory leak in spell_read_dic()
Problem:  spell: memory leak in spell_read_dic() (after 9.2.0524).
Solution: Free "pc" before breaking out of the loop (zeertzjq).

closes: vim/vim#20309

6c8e125395
2026-05-24 18:03:23 +08:00
zeertzjq
1bf38c302d vim-patch:9.2.0524: spell: buffer overflow with many affix or compound flags
Problem:  spell: a word in a .dic file with many postponed prefix or
          compound flags overflows the fixed-size store_afflist[MAXWLEN]
          buffer in get_pfxlist() and get_compflags().
Solution: Add bounds checks (Yasuhiro Matsumoto).

closes: vim/vim#20286

9a920e8254

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-05-24 18:02:03 +08:00
zeertzjq
61eddb3fe7 vim-patch:9.2.0523: tests: no test for using shellescape() in combination with :! (#39972)
Problem:  tests: no test for using shellescape() in combination with :!
Solution: Add a test that checks runtime files for using wrong
          combination of shellescape() with ! ex command

This has lead to a few security relevant issues, so add a test that
checks all runtime files for any ! followed by a shellescape() that does
not use the {special} arg.

related: Commit: 3fb5e58fbc63d86a3e65f1a141b0d67af2 (patch 9.2.0479:
         [security]: runtime(tar): command injection in tar plugin)

closes: vim/vim#20286

Supported by AI

fccc2adc98

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-24 09:29:50 +08:00
zeertzjq
1a064abb0a vim-patch:9.2.0517: quickfix: can set quickfixtextfunc in restricted/sandbox mode (#39970)
Problem:  quickfix: can set quickfixtextfunc in restricted/sandbox mode
          (tacdm)
Solution: Disallow setting the quickfixtextfunc option from a sandbox
          and restricted mode (Yegappan Lakshmanan).

closes: vim/vim#20305

cb8510d470


Co-Authored-by: tacdm

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2026-05-24 08:49:02 +08:00
zeertzjq
daf2506a6d vim-patch:ecba601: runtime(doc): fix a few small problems (#39969)
closes: vim/vim#20287

ecba601e3f
2026-05-24 00:10:36 +00:00
zeertzjq
b6b2b12494 vim-patch:9.2.0515: virtualedit=insert doesn't work during change operation (#39968)
Problem:  virtualedit=insert doesn't work during change operation
          (after 6.1.014).
Solution: Make virtual_op only affect virtualedit=block (zeertzjq).

related: neovim/neovim#35391
closes:  vim/vim#20298

3d0a6073e5
2026-05-23 23:59:08 +00:00
zeertzjq
c8dbb04da9 vim-patch:9.2.0510: setline() mapping may trigger autoindent (#39961)
Problem:  setline() insert mode mapping may trigger autoindent,
          corrupting the newly inserted line content (Evgeni Chasnovski)
Solution: Only strip autoindent whitespace when the rest of the line is
          all whitespace (glepnir).

fixes:  vim/vim#19363
closes: vim/vim#20290

e3dedac77b

Co-authored-by: glepnir <glephunter@gmail.com>
2026-05-23 08:57:36 +08:00
zeertzjq
7a1bad27ca vim-patch:9.2.0513: [security]: memory safety issues in spellfile.c (#39960)
Problem:  [security]: memory safety issues in spellfile.c
          (tacdm)
Solution: Add recursion limit to read_tree_node(), add length limit
          check in tree_count_words(), use alloc_clear() in
          spell_read_tree().

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-3h95-3962-mmvf

25e4e46c58

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 00:51:47 +00:00
zeertzjq
f53d9ac90b vim-patch:c7645fc: runtime(doc): add a few references to mouse behaviour (#39959)
fixes: vim/vim#20281

c7645fcda5

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-23 07:47:49 +08:00
Luuk van Baal
b58ce1ab79 fix(statusline): no cmdline ruler for autocommand window
Problem:  Cmdline ruler may be drawn for autocommand window.
Solution: Check that the current window is not an autocommand window
          when deciding whether to draw the ruler.
2026-05-22 17:54:24 +02:00
dependabot[bot]
17f233d56b ci: bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [github/codeql-action](https://github.com/github/codeql-action) and [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action).


Updates `github/codeql-action` from 4.35.4 to 4.35.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.35.4...v4.35.5)

Updates `zizmorcore/zizmor-action` from 0.5.3 to 0.5.5
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](b1d7e1fb5d...a16621b09c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-22 15:04:11 +02:00
Justin M. Keyes
a9deb8be53 Merge #39000 MessageStream abstraction 2026-05-22 08:45:10 -04:00
Yi Ming
680ab13951 refactor(lsp): avoid using coroutine when parsing frames 2026-05-22 18:20:55 +08:00
Yi Ming
0e81835fae refactor(lsp): message stream abstraction for message framing 2026-05-22 18:20:51 +08:00
Yi Ming
929e644a5a refactor(lsp): move vim.lsp._transport to vim.net._transport 2026-05-22 18:19:19 +08:00
Justin M. Keyes
b576807410 Merge #39939 from marcuscaisey/lsp-completion-details 2026-05-22 04:39:55 -04:00
Maria Solano
71c72c3409 fix(lsp): validate that workspace_edit isn't nil (#39947) 2026-05-21 19:00:02 -07:00
zeertzjq
dee602e659 vim-patch:9.2.0508: completion: cannot complete user cmd :K with 'ignorecase' (#39944)
Problem:  completion: cannot complete user cmd :K with 'ignorecase'
          (rendcrx)
Solution: Skip the short-circuit when 'ignorecase' is set
          (Yasuhiro Matsumoto)

The set_cmd_index() short-circuit for the :k command treats ":k<X>" as
":k {X}" (mark argument), which makes ":kz<Tab>" never reach the
command-name expansion path. With 'ignorecase' the same prefix on other
letters (":gz<Tab>") completes a user command like :Gz, so the result is
inconsistent. Skip the short-circuit when 'ignorecase' is set; default
behaviour is preserved so the existing :k tests still pass.

fixes:  vim/vim#20241
closes: vim/vim#20275

b54e57ee54

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-05-22 08:07:55 +08:00
zeertzjq
2b5d611d6b vim-patch:44a1a6a: runtime(doc): Update wrong shellescape() example
44a1a6a331

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-22 07:40:03 +08:00
zeertzjq
d01cc0b8d0 vim-patch:6845c7a: runtime(doc): fix a typo in :map-local
closes: vim/vim#20276

6845c7a63d

Co-authored-by: nyngwang <nyngwang@gmail.com>
2026-05-22 07:40:03 +08:00
zeertzjq
f7ad2dd19f vim-patch:ff9fd81: runtime(debversions): Add stonking (26.10) as Ubuntu release name
closes: vim/vim#20282

ff9fd819ae

Co-authored-by: Guilherme Puida Moreira <guilherme@puida.xyz>
2026-05-22 07:40:03 +08:00
Marcus Caisey
2845f95171 fix(lsp): advertise that CompletionItem.detail can be resolved (#39934)
Problem:
We can resolve the `CompletionItem.detail` field but don't advertise
this capability.

Solution:
Add `detail` to
`textDocument.completion.completionItem.resolveSupport.properties`.
2026-05-21 13:57:53 -07:00
Marcus Caisey
c75365d22a refactor(lsp): centralise complete item info generation logic
Problem:
The logic for generating the complete item `info` is spread across
`_lsp_to_complete_items`, the `CompleteChanged` event handler, and
`CompletionResolver:request`. This has previously caused the `info`
shown for resolved (via `completionItem/resolve`) and unresolved items
to differ.

Solution:
Centralise the logic in a new `complete_item_info` function which is now
solely responsible for determining:
1. The `info` to show.
2. The markup kind of the `info`.
3. Whether the `info` is complete.

This simplifies the interaction between the 3 functions mentioned in the
problem:
- `_lsp_to_complete_items` calls `complete_item_info` and passes along
  the markup kind and whether the item needs resolving via the complete
  item's `user_data`.
- The `CompleteChanged` consumes the markup kind and whether the
  item needs resolving from the complete item's `user_data`.
- `CompletionResolver:request`, like `_lsp_to_complete_items` calls
  `complete_item_info` again and updates the current `info` if it's
  changed.
2026-05-21 18:22:13 +01:00
Marcus Caisey
d6d03716cf fix(lsp): show detail in popup when server can't completionItem/resolve
Problem:
`CompletionItem.detail` is only shown in the info popup if the server
supports `completionItem/resolve`.

Solution:
If the server doesn't support `completionItem/resolve`, prepend the
complete item `info` with `CompletionItem.detail` in a fenced codeblock,
same as we do when the server supports `completionItem/resolve`.

To ensure that completion items are displayed in the same way,
regardless of whether the server supports `completionItem/resolve`, i've
extracted out the test logic from the `selecting an item triggers
completionItem/resolve + (snippet) preview` case so that we can run the
same tests against a server which supports `completionItem/resolve` and
one which doesn't. Hopefully this should prevent the two behaviours
diverging again.
2026-05-21 18:22:13 +01:00
Marcus Caisey
ce7df01391 fix(lsp): resolve CompletionItem if resolvable fields aren't populated
Problem:
If `CompletionItem.documentation` is populated but `detail` is not, then
`detail` is not resolved.

Solution:
Ensure that we resolve a `CompletionItem` if either `detail` or
`documentation` are not populated.

I've also removed `detail` from the popup menu since otherwise it will
be populated in both the popup menu and the info popup after the
`CompletionItem` has been resolved. I think the info popup is the best
place for it anyway as when there is a completion item with a long popup
menu entry (when `detail` is a medium/long function signature for
instance), the whole popup menu gets widened and this steals horizontal
space that could be used to display the `documentation`. Now with
`detail` and `documentation` in the info popup, they share the same
horizontal space. This also aligns with how VSCode, nvim-cmp, blink.cmp,
and mini.nvim display `detail`.
2026-05-21 18:15:14 +01:00
Marcus Caisey
10a53e7637 fix(lsp): generate snippet preview from resolved textEdit.newText
Problem:
When a resolved `CompletionItem` with kind `Snippet` populates
`textEdit` instead of `insertText`, the contents are not previewed.

Solution:
Generate the snippet preview from `textEdit.newText` as well.
2026-05-21 17:47:08 +01:00
glepnir
7662001c48 fix(float): simplify :bufdelete focus retry #39928
Problem:
Followup to #39858. close_windows returned a holder window just so
do_buffer_ext could retry there, but the non-float branch was dead code
and close_windows was called twice.

Solution:
Check one_window directly in do_buffer_ext, drop the holder, make
close_windows void again.

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
2026-05-21 10:38:04 -04:00
Justin M. Keyes
1be55d02f5 fix(net): set buftype=nofile (again) #39930
redux 24e00f2844
2026-05-21 12:46:30 +00:00
luukvbaal
89431707a0 fix(ui2): unable to stop display of very long message #39823
Problem:  Processing of a very long message may take a long time; there
          is no visual feedback of work being done, and no way to abort
          processing.
          Calculating text height for spill indicator inhibits
          performance for very long message.

Solution: Whenever writing part of a message is taking longer than 100ms,
          show the first part of the message, while checking for CTRL-C.
          Calculate ('wrap'-ed) text height accurately until 'lines',
          use line count beyond that.
2026-05-21 05:24:39 -04:00
glepnir
26df751add fix(float): :bufdelete in floatwin may change focus #39858
Problem:
(Followup to 54f22a8f01c0feb27a531b52aedf5cdbd5e51b24.)
Deleting another buffer from a floatwin could move focus into the holder
window and fire BufEnter for the buffer being deleted.

Solution:
Use switch_win_noblock() instead of buf_jump_open_win() before
recursing into do_buffer_ext().
2026-05-21 05:06:50 -04:00
Kyle
7337e02563 refactor(docs): generate tui.txt $NVIM_TERMDEFS keys #39836
Problem:
Potential documentation drift in `tui.txt` if fields for
`$NVIM_TERMDEFS` change.

Solution:
Generate docs for `tui.txt`. Add `brief_xform` to `gen_vimdoc.lua` to
allow transforming briefs during generation.
2026-05-21 04:39:45 -04:00