Commit Graph

36994 Commits

Author SHA1 Message Date
Barrett Ruth
6576e75eeb feat(dir.lua): global "-" default mapping #40426 2026-06-26 06:17:00 -04:00
Lewis Russell
ea0af59854 fix(api): preserve ArrayOf metadata #40429
ArrayOf metadata existed before the LuaCATS type documentation refactor and is
useful to typed clients consuming api_info().

Keep Tuple metadata normalized to Array, since tuple element types can be mixed,
but preserve ArrayOf(...) for exported API metadata.

Fixes #38734

AI-assisted: Codex
2026-06-26 05:50:17 -04:00
Barrett Ruth
b9b1992d9d docs(runtime): directory filetype #40424 2026-06-25 19:05:44 -04:00
Barrett Ruth
ac82dd3348 test(runtime): exercise dir.lua on Windows #40423 2026-06-25 22:20:03 +00:00
Barrett Ruth
bf917a503a feat(runtime): replace netrw with a very small script #39723
Problem:
`:edit <dir>` and `nvim <dir>` currently rely on netrw to show local directory
contents.

Solution:
- Provide `filetype=directory`.
- Introduce dir.lua, a small plugin that provides directory listing, opening
  items, parent navigation, and refresh.
- `netrw` remains available for `:Explore`, remote paths, archives, and file
  operations. To continue 

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-06-25 17:31:18 -04:00
Justin M. Keyes
dd5ebae7ac Merge #40325 from justinmk/cmdwin 2026-06-25 13:06:01 -04:00
Justin M. Keyes
5ddb4b672e fix(ui2): "msg_history_show" error while in cmdwin
Problem:
Executing :messages while in cmdwin fails:

    Error in "msg_history_show" UI event handler (ns=nvim.ui2):
    Lua: …/_core/ui2/messages.lua:699: Invalid 'height': expected positive Integer
    stack traceback:
    [C]: in function 'nvim_win_set_config'
    …/_core/ui2/messages.lua:699: in function 'set_pos'
    …/_core/ui2/messages.lua:329: in function 'set_target_pos'
    …/_core/ui2/messages.lua:389: in function 'show_msg'
    …/_core/ui2/messages.lua:553: in function 'handler'
    …/_core/ui2.lua:161: in function 'ui_callback'
    …/_core/ui2.lua:210: in function <…/_core/ui2.lua:202>

The bug: when `texth.all` is small (e.g. 0 from a hidden pager whose new
content isn't laid out yet), or when the available height after
subtracting the cmdwin is small, `math.min(min, …)` can yield 0, and
`nvim_win_set_config` rejects `height=0`.

Solution:
Floor at 1.
2026-06-25 18:36:24 +02:00
Justin M. Keyes
b2bf7bcfb1 feat(cmdwin): implement cmdwin as a normal buf+win
Problem:

cmdwin (the `:q` cmdline buffer) has various limitations which require
special-casing all over the codebase.

Besides complicating the code, it also breaks async plugins if they try
to create buffers/windows after some work is done, if the user happens
to open cmdwin at the wrong the moment:

    Lua callback: …/guh.nvim/lua/guh/util.lua:531:
    E11: Invalid in command-line window; <CR> executes, CTRL-C quits
    stack traceback:
        [C]: in function 'nvim_buf_delete'
        …/guh.nvim/lua/guh/util.lua:531: in function <…/guh.nvim/lua/guh/util.lua:526>

Solution:

Just say no to "inception". Reimplement cmdwin as a normal buffer+window.

All of the cmdwin contortions (in both core, and innocent plugins) exist
literally only to support "inception": recursive
cmdwin-in-cmdline-things, like `<c-r>=`, `/`, search-during-substitute,
`:input()`, etc. So we just won't support that (though I have
a potential plan for that later, which I call "modal parking lot").

The benefit is that plugins, and core, no longer have to care about
cmdwin.

BONUS:
- mouse-drag on vertical separators works (it only worked for
  horizontal/statusline before)
- inccommand-in-cmdwin now works correctly, for free (thus don't need
  #40077).

POTENTIAL FOLLOWUPS
- Drop `CHECK_CMDWIN` ("E11: Invalid in command-line window"), allow chaos.
- Unify `BUFLOCK_OK` / `LOCK_OK` ?

DESIGN:
- Eliminate lots of C globals, `EX_CMDWIN`, etc.
- `text_locked()` no longer reports true for cmdwin.
- cmdwin = a normal window with 'winfixbuf', 'bufhidden=wipe',
  'buftype=nofile'. Invariants come from those options rather than
  special cases throughout the codebase.
- `nv_record` for q:/q//q? calls Lua
  `nlua_call_vimfn("vim._core.cmdwin", …)`. No `K_CMDWIN`
  / cmdline-reader detour.
- `cedit_key` (`c_CTRL-F`) schedules a deferred event that calls
  `vim._core.cmdwin.open(type, content, pos)` and returns `Ctrl_C` so
  the in-flight cmdline cancels. Reader state is not serialized; instead
  the captured `(type, line, col)` is replayed via
  `nvim_feedkeys(type..line.."<CR>", "nt", …)` after user confirms.
- On confirm/cancel: `<CR>` / `<C-C>` calls into Lua which closes the
  window and re-feeds the cmdline.

BREAKING CHANGES:
- Expression-register cmdline (`<C-R>=` from insert-mode) no longer
  supports cmdwin. Same applies to `input()` / `inputlist()` (already
  covered by `text_locked`).
- Usage of cmdwin in macros/mappings will probably break (assuming they
  ever worked).
2026-06-25 18:36:24 +02:00
Dmytro Meleshko
bcfc2037ef perf(treesitter): reduce memory usage of _select.lua #40409
Problem:  The table `history` in treesitter/_select.lua stores references
          to previously selected TSNodes, but a TSNode needs to keep its
          whole TSTree alive in memory, which may be kept alive even
          after closing the buffer to which this history corresponds.

Solution: Store just the bits of information from the TSNode we need to
          go back in selection history (the range and ID), without
          referencing the TSNode itself.
2026-06-25 11:46:26 -04:00
Dmytro Meleshko
9afa8477b3 fix(treesitter): incremental selection causes beeps when the bell is enabled #40414
Problem:  The function visual_select() in treesitter/_select.lua is
          executing `:normal! v<Esc>` to ensure that `gv` later goes
          back to character Visual mode, but doing so when mode() is
          already `v` first switches back to the Normal mode, then
          executes <Esc>, which causes a beep.
Solution: Check if the mode() is already `v` and avoid any switching in
          that case.
2026-06-25 11:36:24 -04:00
Justin M. Keyes
122be61ed2 ci(reviewers): inline scripts, drop checkout #40413
Problem:
- The `reviewers_add`/`reviewers_remove` CI jobs checkout the repo only
  for the purpose of `require('…/reviewers_add.js')`.
- `reviewers_remove` also runs on `closed`, so a merged fork PR will trip
  the new allow-unsafe-pr-checkout guard of `actions/checkout@v7`.

Solution:
- Drop the use of `actions/checkout`.
- Inline the script in the CI yaml definitions.
- Also await the mutating calls (previously fire-and-forget) and guard
  empty reviewer lists.
2026-06-25 10:01:09 -04:00
Justin M. Keyes
c456c652b5 ci(backports): "Refusing to checkout from 'pull_request_target'" #40410
Problem:
The backport workflow started failing since we updated to v7 of
`actions/checkout@v7.0.0`. The workflow runs on `pull_request_target`
(closed + merged) and failed with:

    Refusing to check out fork pull request code from a 'pull_request_target'
    workflow. Review the risks at https://gh.io/securely-using-pull_request_target

Example: https://github.com/neovim/neovim/actions/runs/28161004305

Analysis:
v7.0.0 added the `allow-unsafe-pr-checkout` guard, which refuses when the
resolved checkout SHA matches the PR's head.sha *or* merge_commit_sha. With no
explicit `ref`, checkout resolves to the base branch tip (`github.sha`). For a
merged PR that tip *is* the merge commit, so the guard refuses even
though it is already-merged trusted base code, not live fork code.

Solution:
Checkout the base branch by name. A branch ref is neither a SHA nor
a `refs/pull/*` ref, so the guard passes. This is also semantically more
correct: backports should branch off the ref the PR merged into.
2026-06-25 09:15:39 -04:00
Barrett Ruth
4d9e5acfb5 fix(lsp): skip invalid file watcher globs #40376 #40396
Some servers register `workspace/didChangeWatchedFiles` watchers for URI
schemes that cannot be watched locally. Skipping the unsupported glob
and keep the rest of the registration batch active.
2026-06-25 03:44:33 -04:00
jdrouhard
3c924d13fe fix(lsp): fire LspNotify didChange autocmds after undo/redo #40404
Problem: LspNotify autocmds were not being triggered for didChange
requests when being used during undo/redo (and possibly other) actions.
autocmds are blocked when calling on_lines() callbacks while doing the
undo/redo action.

Solution: Defer firing the autocmd until after the action is complete.
This is closer to what existed before, but now there's a check in the
deferred function to only fire the autocmd if the client is still
active and the buffer is still attached, if applicable.
2026-06-25 03:37:39 -04:00
zeertzjq
e715122e4e vim-patch:9.2.0725: [security]: Stack out-of-bounds write in spell_soundfold_sal() (#40402)
Problem:  [security]: A crafted spell file with non-collapsing SAL rules
          can make soundfold() write one byte past the end of the
          MAXWLEN result buffer.  This is the same class of
          out-of-bounds write as GHSA-q8mh-6qm3-25g4 (fixed in 9.2.0698
          for the SOFO branch), found while auditing the surrounding
          code.
Solution: Bound the single-byte SAL result writes and the terminating
          NUL to MAXWLEN - 1, matching the SOFO branch.

The single-byte branch of spell_soundfold_sal() guarded its writes with
"reslen < MAXWLEN", allowing reslen to reach MAXWLEN (254).  The trailing
"res[reslen] = NUL" then wrote at index 254 of the 254-byte stack buffer
res[MAXWLEN], an off-by-one out-of-bounds write.  Input is case-folded to
about 253 characters, so a 253-character argument together with a SAL map
that does not collapse (collapse_result false) reaches the boundary.

Related to previous issue
[GHSA-q8mh-6qm3-25g4](https://github.com/vim/vim/security/advisories/GHSA-q8mh-6qm3-25g4)
(9.2.0698)

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-m3hf-xcm3-xhm2

d22ff1c955

This is N/A as Nvim doesn't have spell_soundfold_sal() which is only
used in the !has_mbyte code path.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 00:17:38 +00:00
zeertzjq
12ded1f36c vim-patch:9.2.0717: tests: strange indent in Test_autocmd_dup_arg() (#40400)
Problem:  tests: strange indent in Test_autocmd_dup_arg()
          (after v9.2.0708)
Solution: Indent using the settings in the modeline.

closes: vim/vim#20619

05df981c35
2026-06-24 23:40:09 +00:00
Dmytro Meleshko
764e257ae5 vim-patch:9.2.0718: :syn sync without an argument also lists syntax cluster (#40399)
Problem:  :syn sync without an argument also lists every defined cluster
Solution: Fix control flow in syn_cmd_list() so that only the syncing
          items are printed when this function gets called by :syn sync.
          (dmitmel)

closes: vim/vim#20614

f2954c821e
2026-06-25 07:36:56 +08:00
Justin M. Keyes
8661b0b6d0 refactor(stl): rename redraw_custom_statusline, win_redr_custom #40393
`redraw_custom_statusline` and `win_redr_custom` are misleading bc the
builtin statusline is always "custom". And that terminology will be even
more irrelevant once 'tabline' and 'ruler' are similarly migrated.
2026-06-24 10:57:33 -04:00
luukvbaal
7b04725750 fix(autocmd): no cleanup for redraw curwin change #40389
Problem:  Unecessary/unexpected cleanup happens when restoring the
          current window for redraw purposes (since 28ffb334).
Solution: Don't call autocmd_restbuf() to restore the current window,
          just do so directly.
2026-06-24 14:54:17 +00:00
Barrett Ruth
8bf7fc810a fix(tty): filter terminal probes by channel #40356
Problem:
Terminal probes sent with `nvim_ui_send()` can reach more than one stdout TTY
UI. Probes with a known TTY UI owner should not accept `TermResponse`s from
unrelated UI channels. 

Solution:
Thread the existing `chan` filter through owned terminal probes. This covers
startup/attach background detection, fallback truecolor detection, and
`vim.tty.query()` forwarding opts to `vim.tty.request()`.

Note: Not every terminal escape path is updated here. I only passed `chan` when
the caller already knows which TTY UI owns the probe. For example, this does
not include:
- (Followup) OSC 52 (system clipboard) detection. It needs to capture the
  `UIEnter` channel. Adding `{ chan = ... }` only to the nested query would be
  half a fix.
- OSC 52 _paste_ is left global because the provider callback does not have
  a UI channel (paste is invoked without a ui channel/tty ui object).
2026-06-24 10:40:36 -04:00
dependabot[bot]
08a1228f82 ci: bump actions/checkout from 6.0.3 to 7.0.0 #40392
ci: bump actions/checkout in the github-actions group across 1 directory

Bumps the github-actions group with 1 update in the / directory: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 6.0.3 to 7.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6.0.3...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-24 08:47:26 -04:00
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>
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