36973 Commits

Author SHA1 Message Date
zeertzjq
19f64a2680 vim-patch:9.2.0708: Leaks in do_autocmd in error case (#40386)
Problem:  Leak in do_autocmd in error case (Cheng)
Solution: goto err_exit in the error case and clean up, make the double
          ++once an actual error

closes: vim/vim#20606

98f5171ef6

Co-authored-by: Christian Brabandt <cb@256bit.org>
nightly
2026-06-24 08:23:32 +08:00
zeertzjq
c7f83f90ed vim-patch:8dfde7b: runtime(dnsmasq): add new keywords and order existing keywords alphabetically (#40385)
closes: vim/vim#20616

8dfde7b336

Co-authored-by: Pooyan Khanjankhani <pooyankhan@gmail.com>
2026-06-24 07:45:11 +08:00
luukvbaal
28ffb334cf fix(autocmd): never draw aucmd_prepbuf temp win #40379
Problem:  An autocommand that redraws may do so while curwin is
          temporarily set for the autocommand scope. This can result in
          flickering or unexpected state with UI components (statusline,
          winbar, decor providers...) that depend on the current window.
          Current workaround for statusline and winbar specifically
          delays the redraw, which can itself be unexpected for the
          autocommand.

Solution: If redrawing happens with a temporary autocmd current window,
          temporarily restore the current window while redrawing.
2026-06-23 16:05:26 -04:00
Justin M. Keyes
8e3b216d0b docs: bufadd(), fnameescape() guidance #40378 2026-06-23 10:08:50 -04:00
zeertzjq
ceaf2baa60 test: fix confusing behavior of eq() with context (#40375) 2026-06-23 18:30:23 +08:00
Barrett Ruth
db30608058 fix(tui): attribute TermResponse to source channel #40330
Problem: Attach-time terminal probes cannot distinguish responses from
different attached UIs.

Solution: Identify the UI by RPC channel id in `TermResponse` and make
`vim.tty.request()` filter responses by channel.
2026-06-23 06:19:56 -04:00
Barrett Ruth
e4fbe162c1 fix(statusline): defer redraw in aucmd context #40309
Problem: `nvim_exec_autocmds({buf=...})` may temporarily switch curwin/curbuf
through `aucmd_prepbuf()`. Requested statuslines/winbars before
`aucmd_restbuf()` may erroneously see the target window as current.

Solution: Track `aucmd_prepbuf()` window-switch depth and leave statusline/winbar
redraws marked dirty until the original window is restored.
2026-06-23 06:05:11 -04:00
github-actions[bot]
487176dcfc docs: update version.c #40372
vim-patch:9.2.0700: configure: -lrt requirement for timer_create not detected
vim-patch:9.2.0701: tests: test_terminal.vim does not wait for job to finish
vim-patch:9.2.0704: GTK4: not handling mouse events
vim-patch:9.2.0706: tests: test_terminal3 may fail when $SHELL is zsh

vim-patch:9.0.0547: looping over empty out_loop[] entries
vim-patch:9.0.0718: extra empty line between two virtual text "below"
vim-patch:9.0.0723: extra empty line below virtual text when 'list' is set
vim-patch:9.0.0962: virtual text below cannot be placed below empty lines
vim-patch:9.0.0975: virtual text below empty line misplaced when 'number' set
2026-06-23 06:02:00 -04:00
zeertzjq
eb0bd381e5 vim-patch:9.2.0707: completion: popup misplaced when text before it is concealed (#40374)
Problem:  When the cursor line has concealed text before the start of the
          completion, the insert-mode completion popup is drawn at the wrong
          screen column and the cursor no longer lines up with the completed
          text.
Solution: Record the concealed width before the cursor on its screen line in
          a new `win_T` field while `win_line()` draws it, subtract it in
          `pum_display()` to place the menu over the visible text, and redraw
          the cursor line so `win_line()` corrects the cursor too.

closes: vim/vim#20539

d167c50de4

Co-authored-by: Barrett Ruth <br@barrettruth.com>
2026-06-23 08:51:03 +00:00
Shiva Priyan
e750f7c357 vim-patch:9.2.0702: :windo and :tabdo create an extra window with 'winfixbuf' (#40358)
Problem:  With 'winfixbuf' set in the current window, :windo and :tabdo
          create an extra split window, even though they only visit
          existing windows/tabpages and don't change the current
          window's buffer (Collin Kennedy)
Solution: Skip the 'winfixbuf' escape in ex_listdo() for :windo and
          :tabdo (ShivaPriyanShanmuga)

fixes:  vim/vim#14301
closes: vim/vim#20600

5767d80b37
2026-06-23 01:13:18 +00:00
zeertzjq
8832c381e1 vim-patch:9.2.0705: :delete # silently fails to update "# and clobbers "0 (#40371)
Problem:  ':delete #' silently fails to update "# and clobbers "0.
Solution: Treat "# like "/, writable only with :let and setreg().

closes: vim/vim#20592

7aeab74687

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-06-23 00:52:39 +00:00
zeertzjq
313be457f5 Merge pull request #40370 from zeertzjq/vim-8513982
vim-patch: runtime file updates
2026-06-23 07:05:44 +08:00
zeertzjq
59a5e320da vim-patch:4ed61e0: runtime(dtrace): handle DTrace probe highlighting before action blocks
Recognize DTrace probe descriptions that are followed immediately by an
action block, such as:

    BEGIN{ trace(1); }
    syscall::open:entry{ trace(1); }

The fourth probe field now consumes the remaining non-whitespace text, and
the lookahead allows zero or more whitespace before the following token.

closes: vim/vim#20560

4ed61e0a19

Co-authored-by: Vladimír Marek <vlmarek13@gmail.com>
2026-06-23 06:51:48 +08:00
zeertzjq
8532fc2021 vim-patch:fc6d0d4: runtime(beancount): Add support for non-ASCII account names
closes: vim/vim#20597

fc6d0d418d

Co-authored-by: 依云 <lilydjwg@gmail.com>
2026-06-23 06:51:33 +08:00
zeertzjq
b595654c39 vim-patch:8c670b3: runtime(fennel): Update Last Update header
forgotten from commit 8513982a5ed5a84ba8e4e532505b07b4fa1efbdb

8c670b3a51

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-06-23 06:50:12 +08:00
zeertzjq
8f98882c11 vim-patch:8513982: runtime(fennel): add more ";" comment leaders to 'comments'
closes: vim/vim#20579

8513982a5e

Co-authored-by: yilisharcs <yilisharcs@gmail.com>
2026-06-23 06:49:13 +08:00
dependabot[bot]
84cae24e44 ci: bump msys2/setup-msys2
Bumps the github-actions group with 1 update in the / directory: [msys2/setup-msys2](https://github.com/msys2/setup-msys2).


Updates `msys2/setup-msys2` from 2.31.1 to 2.32.0
- [Release notes](https://github.com/msys2/setup-msys2/releases)
- [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md)
- [Commits](e9898307ac...66cd2cce69)

---
updated-dependencies:
- dependency-name: msys2/setup-msys2
  dependency-version: 2.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-22 18:31:52 +02:00
Luuk van Baal
e542b42903 fix(ui2): message before empty prompt not shown
Problem:  Message before empty input() is not visible.
Solution: Route to dialog window with active prompt (hl_id >= 0).
2026-06-22 15:56:26 +02:00
Luuk van Baal
d16bd456a8 fix(cmdline): encode no prompt in cmdline_show.hl_id
Problem:  Unable to distinguish an empty prompt from no prompt in
          cmdline_show event.
Solution: Set cmdline_show.hl_id to -1 when no prompt is active.
2026-06-22 15:56:26 +02:00
Luuk van Baal
60a46036c0 fix(ui2): clear search_count after clearing the screen
Problem:  Clearing the screen doesn't clear the "last" virtual text.
          Dupe counter virtual text is not increased beyond 1.
Solution: Clear "last" virtual text when clearing the screen.
          Restore assignment lost in a previous commit.
2026-06-22 15:14:53 +02:00
github-actions[bot]
410a5b6544 docs: update version.c #40348
vim-patch:e34458465 Optimize vim.ico
vim-patch:a092d249b ccfilter: buffer overflow in ccfilter.c with crafted compiler output
vim-patch:9.2.0679: [security]: Out-of-bounds read with text property virtual text
vim-patch:738e6863d runtime(doc): regenerate help tags
vim-patch:9.2.0681: configure: -lruby added even for a dynamic ruby build
vim-patch:9.2.0685: clipboard.c does not get the Wayland CFLAGS on GTK2
vim-patch:9.2.0687: popup_image_composites_frames() has improper if block scope
vim-patch:fefa6550f translation(ru): fix typo in Russian translation for the new tutor
vim-patch:a6c8c2d83 CI: Bump msys2/setup-msys2
vim-patch:9.2.0691: Solaris: Test_terminal_composing_unicode() fails
vim-patch:9.2.0693: tests: Test_suspend() may fail because of keyprotocol query
vim-patch:b7cf2a544 Add README.ja.txt and LICENSE.ja.txt
vim-patch:9.2.0696: GTK4: A few issues with toolbar support
vim-patch:e31ec2ef0 nsis: Remove NSIS Installer Code

vim-patch:8.2.0291: Vim9: assigning [] to list<string> doesn't work
vim-patch:8.2.0453: trailing space in job_start() command causes empty argument
vim-patch:8.2.0526: Gcc 9 complains about empty statement
vim-patch:8.2.2133: Vim9: checking for a non-empty string is too strict
vim-patch:8.2.2135: Vim9: #{ still seen as start of dict in some places
vim-patch:8.2.2137: Vim9: :echo and :execute give error for empty argument
vim-patch:8.2.2677: Vim9: cannot use only some of the default arguments
vim-patch:8.2.3456: Vim9: not all functions are tested with empty string argument
vim-patch:8.2.4229: possible crash when invoking timer callback fails
vim-patch:8.2.4872: Vim9: no error for using an expression only
vim-patch:8.2.4906: MS-Windows: cannot use transparent background

vim-patch:9.0.1053: default constructor arguments are not optional
vim-patch:9.0.2034: don't try to copy SMACK attribute, when none exist

vim-patch:9.2.0697: possible overflow when parsing CSI keys
2026-06-22 06:07:11 -04:00
zeertzjq
259f1173e4 vim-patch:9.2.0698: [security]: Out-of-bounds write with soundfold() (#40362)
Problem:  [security]: Out-of-bounds write with soundfold()
          (cipher-creator)
Solution: Add an abort condition to the for loop to validate the buffer
          size.

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-q8mh-6qm3-25g4

Supported by AI

497f931f85

This is N/A as it only changes the !has_mbyte code path.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-06-22 02:34:22 +00:00
zeertzjq
257701b17b vim-patch:9.2.0689: the "%" command is slow on a long line with many slashes (#40361)
Problem:  The "%" command can be very slow on a long line that contains
          many slashes, for example a line of base64 data.
Solution: When looking for a line comment, scan the line only once while
          skipping over strings, instead of rescanning from the start for
          every slash.  Move check_linecomment() to cindent.c so it can
          reuse the file-local skip_string().

related: vim/vim#20491
fixes:   vim/vim#20557
closes:  vim/vim#20575

9f9af034ad

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 02:28:15 +00:00
zeertzjq
7d0adc08f7 vim-patch:9.2.0699: [security]: possible code execution with python complete (#40363)
Problem:  [security]: possible code execution with python complete
          (morningbread)
Solution: Use repr() to quote the doc strings correctly

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-ppj8-wqjf-6fp3

Supported by AI

cce141c427

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-06-22 02:26:37 +00:00
zeertzjq
e59684318e vim-patch:f83e00b: runtime(xslt,xsd): speed up highlighting by optimizing lookbehinds in patterns
Move ownership to chrisbra/vim-xml-ftplugin

closes: vim/vim#20436

f83e00b7f8

Co-authored-by: Dmytro Meleshko <dmytro.meleshko@gmail.com>
2026-06-22 09:51:52 +08:00
zeertzjq
19446ec9cb vim-patch:77099ed: runtime(cpp): add C++26 lexical constructs to syntax highlighting
Add a guarded "C++ 26 extensions" block (cpp_no_cpp26) covering new
lexical surface introduced since C++23:

- [[ ... ]] attributes as a region, so P3394 annotations carrying a
  value expression (eg [[=foo{1}]]) no longer trip cErrInBracket on
  their braces/parens. A \w\@1<! look-behind keeps it from matching a
  subscripted immediately-invoked lambda (arr[[]{...}()]).
- ^^ reflection operator (P2996).
- [: :] splice brackets (P2996).
- contract_assert keyword (P2900).

Add input/cpp_cpp26.cpp exercising these constructs with screendumps,
and update dumps/cpp_noreturn_00.dump for the new [[ ]] attribute
delimiter highlighting.

closes: vim/vim#20577

77099ed6b3

Co-authored-by: Gareth Lloyd <gareth@ignition-web.co.uk>
2026-06-22 09:51:52 +08:00
zeertzjq
5999f64c48 Merge pull request #40359 from janlazo/vim-8.2.1888
vim-patch:8.2.{1888,2117}
2026-06-22 09:35:30 +08:00
Jan Edmund Lazo
d31466c244 vim-patch:8.2.2117: some functions use any value as a string
Problem:    Some functions use any value as a string.
Solution:   Check that the value is a non-empty string.

-----

Vim9 remains N/A.
5ccc79e880 ported relevant changes.

7bb4e74c38

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-06-21 21:03:40 -04:00
Jan Edmund Lazo
264631c4c1 vim-patch:8.2.1888: Vim9: getbufline(-1, 1, '$') gives an error
Problem:    Vim9: Getbufline(-1, 1, '$') gives an error.
Solution:   Return an empty list. (closes vim/vim#7180)

e6e70a10f1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-06-21 21:03:40 -04:00
zeertzjq
2dd5e3eb4f vim-patch:9.2.0686: style: strcmp usage is inconsistent (#40353)
Problem:  style: strcmp usage is inconsistent.
Solution: Always explicitly test the return value, matching the dominant
          style.

closes: vim/vim#19101

1a155327d8

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-06-22 07:30:42 +08:00
zeertzjq
9c900c1255 vim-patch:9.2.0684: :reg # does not display the value of the '#' register (#40352)
Problem:  ':registers #' does not display the value of the '#' register.
Solution: Filter the '#' :registers output on a '#' arg instead of '%'
          (Doug Kearns).

closes: vim/vim#20589

0cafe56b74

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-06-21 22:18:08 +08:00
zeertzjq
dc0b54276d vim-patch:9.2.0683: filetype completion mishandles finished sub options (#40351)
Problem:  ":filetype plugin<Tab>" gives "pluginindent" because a
          sub option before the cursor is treated as already given.
Solution: only skip plugin and indent when followed by white space.
          (glepnir)

closes: vim/vim#20594

fe65f23aca

Co-authored-by: glepnir <glephunter@gmail.com>
2026-06-21 14:16:03 +00:00
zeertzjq
9607e53cea vim-patch:9.2.0682: Wrong dot-repeat when calling complete() while filtering completion (#40350)
Problem:  Wrong dot-repeat when calling complete() while filtering
          Ctrl-N completion.
Solution: Also check compl_started for whether completion is active.
          (zeertzjq)

related: neovim/neovim#40346
closes:  vim/vim#20595

37a7e4944f
2026-06-21 14:09:43 +00:00
zeertzjq
131f9f73ac vim-patch:98bf999: runtime(lua): Update ftplugin, fix matchit block comment pattern (#40349)
Include the unecessary but idiomatic leading '--' in the closing block
comment token.

E.g.,
	--[[
	 ...
	--]]

closes: vim/vim#20590

98bf999d58

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-06-21 13:40:03 +00:00
Jan Edmund Lazo
d40c07511a vim-patch:9.0.1328: error when using "none" for GUI color is confusing (#40347)
Problem:    Error when using "none" for GUI color is confusing.
Solution:   Mention that the name should perhaps be "NONE". (closes vim/vim#1400)

5b9f57262f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-06-21 02:42:07 +00:00
zeertzjq
1724096ae0 vim-patch:9.2.0680: keytrans() doesn't replace '|' and '\' (#40345)
Problem:  keytrans() doesn't replace '|' and '\' (user202729)
Solution: Replace '|' and '\' with "<Bar>" and "<Bslash>" respectively.
          (zeertzjq)

fixes:  vim/vim#20585
closes: vim/vim#20586

47fd183c4e
2026-06-21 08:24:52 +08:00
zeertzjq
a1a1977c70 vim-patch:4e6e1fc: runtime(algol68): Update syntax, support size prefixes in denotations (#40344)
Explicitly match the LONG/SHORT size prefixes in integral, real and bits
denotations.

LONG/SHORT are matched as part of the denotation rather than as a mode.

closes: vim/vim#20512

4e6e1fc5ea

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-06-21 08:12:45 +08:00
zeertzjq
9a5944cdc0 vim-patch:9.2.0678: [security]: potential powershell code execution in zip.vim (#40343)
Problem:  [security]: potential powershell code execution in zip.vim
          (DDugs)
Solution: Cleanup zip.vim, introduce PSEscape() to escape() potential powershell code,
          use consistent s:Escape() in the various PowerShell functions

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-x5fg-h5w9-9frf

b2cc9be119

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-06-21 08:12:27 +08:00
Barrett Ruth
74f163c67d fix(defaults): detect 'background'/'termguicolors' on UI attach #40175
Problem:  Terminal background and truecolor detection runs only at startup,
          gated on a UI being attached. A headless server has no UI then, so
          `'background'` and `'termguicolors'` are never detected and remote
          UIs ignore the terminal's theme.
Solution: Also (re)detect on UIEnter. The most recently attached terminal
          wins; an explicit user value is preserved.
2026-06-20 20:09:34 -04:00
Justin M. Keyes
6284c1163a Merge #40342 docs: misc 2026-06-20 16:22:49 -04:00
Justin M. Keyes
c18a63a462 refactor(test): move swapfile test 2026-06-20 21:49:00 +02:00
Justin M. Keyes
07f02ae8de test: cleanup mksession_spec 2026-06-20 19:55:29 +02:00
Justin M. Keyes
9caef3a2f4 fix(health): check more "old" files 2026-06-20 19:55:29 +02:00
luukvbaal
9618032936 perf(ui2): accumulate message lines #40338
Problem:  Writing a message with a large number of newlines
          (:echo "foo\n"->repeat(1000000)) takes longer than it has to
          (since c973c7ae).
Solution: Accumulate newlines in a single API call when possible.
2026-06-20 13:01:58 -04:00
jdrouhard
54188fa242 fix(lsp): make LspNotify more robust #40332
Problem: LspNotify never passed a buffer when executing the autocmds, so
buffer-local LspNotify autocmd subscriptions didn't have the correct buf
in the event metadata. It was also wrapped in a schedule() so the actual
autocmd was delayed until after the event loop.

This could result in the wrong buffer receiving the notification if
multiple LspNotify autocmds with buffer filters were added. Only the
"latest" one would actually receive non-buffer-filtered autocmds, not
the matching one. It also caused listeners to receive the notification
"out of sync" with when the notification is actually sent. If a buffer
is being deleted (which fires a textDocument/didClose notification), the
notification is scheduled and fired after the buffer is already gone.

Solution: For LSP notifications that pertain to a particular buffer, set
it when executing the LspNotify autocmds so the callback functions that
are filtered on that buffer will get the correct notifications and the
metadata buf field will be correct. Additionally, there is no need to
wrap the LspNotify callback in vim.schedule when it can be called inline
when the notification to the rpc server is fired.

This is tested by removing now-unnecessary autocmds from semantic tokens
(InsertEnter and BufWinEnter should no longer be necessary now that
requests are fired by LspNotify). Without this fix, simply modifying a
buffer doesn't actually trigger LspNotify correctly, and the test for
that fails.
2026-06-20 12:46:58 -04:00
jdrouhard
6bc6461eac fix(lsp): multiline semantic token processing #40339
Problem: When multiline semantic token support was introduced, the loop
that finds the end line for a particular token didn't sanitize the token
length sent back by the LSP server. If the server returned an overflowed
length (near uint32 max), neovim would burn cpu and loop for an
extremely long time while trying to find the "end line" represented by
the massively large token, causing neovim to seemingly hang.

Solution: Stop looping once the calculated end_line reaches the actual
last line of the buffer.

Fixes #36257
2026-06-20 10:51:21 -04:00
luukvbaal
69160854c5 feat(column): per row click handlers for 'statuscolumn' (#40265)
Problem:
- Current 'statuscolumn' click label caveat is restrictive.
- v:virtnum is not unique to a line if it has both above and
  below virtual lines.
- 'statuscolumn' click handler may expect v:virt/lnum to be set.

Solution:
- Store per-row click definitions for the statuscolumn in a
  (nested line/virt number) map.
- Implement strategy that gives each 'statuscolumn' row a unique
  v:virtnum.
- Set v:virt/lnum when determining which line is clicked.
2026-06-20 15:59:08 +02:00
github-actions[bot]
62dfb8f08b docs: update version.c #40289
vim-patch:9.2.0654: GTK4: using uninitialised colors in gui_mch_init()
vim-patch:9.2.0655: GTK4: missing NULL checks in vim_form_measure()
vim-patch:9.2.0657: GTK4: missing menu when right-clicking in tabline
vim-patch:9.2.0658: xxd: signed integer overflow in huntype()
vim-patch:9.2.0659: GTK4: no balloon support in GUI
vim-patch:9.2.0660: Dragging the scrollbar does not trigger WinScrolled
vim-patch:9.2.0665: GTK4: GTK critical error on exit printed
vim-patch:9.2.0667: patch 9.2.0590 was wrong
vim-patch:9.2.0668: GTK4: minimum horizontal size is too small
vim-patch:60899596a runtime(doc): Regenerate help tags file
vim-patch:9.2.0671: [security]: possible out-of-bounds read with sodium encrypted files
vim-patch:9.2.0672: corrupted text property causes internal error
vim-patch:9.2.0674: configure: clears dynamic ruby linker flags

vim-patch:9.2.0196: textprop: negative IDs and can cause a crash
vim-patch:9.2.0207: MS-Windows: freeze on second :hardcopy
vim-patch:9.2.0218: visual selection highlighting in X11 GUI is wrong.
vim-patch:9.2.0406: VisualNOS not used when Wayland selection ownership lost
2026-06-20 06:00:15 -04:00
zeertzjq
f876fd906e test(tui_spec): remove unnecessary job_opts variable (#40334)
This was initially added so that the __NVIM_DETACH environment variable
can be added to the jobs started in this test. That environment variable
is no longer needed, and there is also vim.tbl_extend() that can be used
to add an environment variable to a job anyway.

Also, make a shallow copy of opts.env in setup_child_nvim(), as mutating
the opts.env passed in may mask problems in other tests.
2026-06-20 01:17:32 +00:00
Sam Reynoso
6be9459d35 fix(cmdline): avoid redraw loop after wrapped line #40240
Problem:  A wrapped command line and screen width may be redrawn
          repeatedly after calls to `redrawstatus` from lua.

Solution: redrawcmd() redraws the command line, but msg_clr_eos() may
          invalidate cmdline_was_last_drawn during the redraw process.
          Restore cmdline_was_last_drawn when redrawcmd() completes.

Co-authored-by: Sam Reynoso <sam@codeoutpost.com>
Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
2026-06-19 16:24:53 -04:00