Commit Graph

37424 Commits

Author SHA1 Message Date
Barrett Ruth
faaa4d57f1 test: start plugin specs with --clean #40995 2026-07-27 04:26:11 -04:00
zeertzjq
7f8175dc48 Merge pull request #41003 from zeertzjq/vim-f88e719
vim-patch: runtime file updates
2026-07-27 06:47:21 +08:00
zeertzjq
1c83e43f27 vim-patch:916809a: runtime(python): highlight the 'lazy' soft keyword
Lazy imports (PEP 810, to be released in Python 3.15) introduces a
`lazy` soft keyword that's recognized when it precedes a `from` or
`import` keyword.

closes: vim/vim#20342

916809ae1e

Co-authored-by: Jon Parise <jon@indelible.org>
2026-07-27 06:31:58 +08:00
zeertzjq
1d36cf1dbe vim-patch:f88e719: runtime(python): Fix indenting for brackets within python byte strings
Problem:  s:SearchBracket()'s skip-expression matches syntax group
          names ending in "Comment", "Todo", or "String" to decide
          whether a candidate bracket is inside a string/comment
          and should be skipped for indentation purposes. Byte and
          raw-byte string literals (b"...", rb"...") are highlighted
          via the pythonBytes/pythonRawBytes syntax groups, which
          don't end in "String", so brackets inside them (e.g.
          b"[") were never skipped and were counted as real,
          unmatched brackets, producing incorrect indentation.

Solution: Add "Bytes" to the indent script's existing suffix match,
          so pythonBytes/pythonRawBytes are recognized directly, the
          same way pythonString/pythonFString/pythonRawString
          already are.

          This supersedes an earlier version of this fix that
          renamed pythonBytes/pythonRawBytes to
          pythonBytesString/pythonRawBytesString in
          runtime/syntax/python.vim.

fixes:  vim/vim#20812
closes: vim/vim#20827

f88e7191da

Co-authored-by: qwavies <qwavsbusiness@gmail.com>
2026-07-27 06:31:40 +08:00
zeertzjq
ef93e93958 vim-patch:4e3df44: runtime(indent-tests): Annotate timed "search*()"es for tracing
related: vim/vim#17116

4e3df44aa2

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2026-07-27 06:31:33 +08:00
Rob Pilling
c57818bb43 fix(ui2): avoid flickering fileinfo messages #41002
## Flicker cause

ui2's `check_targets()` function creates the hidden ui2 windows with this call chain:
```
nvim_open_win()
win_set_buf()
do_buffer()
set_curbuf()
enter_buffer()
```

and `enter_buffer()` sets `need_fileinfo`:

fdc09be03c/src/nvim/buffer.c (L1837-L1839)

This is then picked up by `normal_redraw`:

fdc09be03c/src/nvim/normal.c (L1381-L1385)

The fileinfo message then causes a ui2 window to appear to display it:

fdc09be03c/runtime/lua/vim/_core/ui2/messages.lua (L325-L330)

... which ends up calling `set_pos`, which registers an `on_key` handler:

fdc09be03c/runtime/lua/vim/_core/ui2/messages.lua (L726-L728)

This handler closes the ui2 window when the user presses, for example, `l` (because the user's not focusing said window).
The handler eventually calls `check_targets()`:

fdc09be03c/runtime/lua/vim/_core/ui2/messages.lua (L594-L595)

and `check_targets()` takes us back to the beginning, causing the ui2 window flicker

## Repro

```vim
=require("vim._core.ui2").enable()
set ch=0 shm-=F ve=all
e /tmp/x
```

Then hit `Ctrl-G` to show fileinfo (if not already shown) and hold `l`

## Fix

Effectively surround the ui2 window creating with `:silent`
2026-07-26 17:40:06 -04:00
Artem Krinitsyn
fdc09be03c fix(help): g==: 'No code block found' #40990
Problem:
The code block query relied on a bug fixed in commit
7ed5609439, where a trailing newline was
not included in a node's text.

Solution:
Fix the query to expect the newline.
2026-07-26 12:27:30 -04:00
Dominic Della Valle
4a5062cda6 fix(path): DOS device path check #40976
Problem:
The current check is intended to match DOS device paths starting with
`\\?` or `\\.` but will match any path starting with `?` or `.`,
including relative paths such as `.\`.
This is because the leading slashes are removed before the comparison.

Solution:
Changes the check to include the path's prefix, assuring the path has
the correct amount of separators for a DOS device path.
2026-07-26 07:18:57 -04:00
Artem Krinitsyn
dec3d8215d fix(text): indent() ignores expandtab when indent unchanged #40932
Problem:
After expanding tabs with the `expandtab` option, if the old indent
matches the requested one, `vim.text.indent()` returns the input
unchanged.
The optimization path assumes that if old_indent == size, the input
wouldn't be changed, which is not correct when old_indent is formed by
expanded tabs.

Solution:
Apply the optimization only when `expandtab` is not set.
2026-07-26 06:24:39 -04:00
Justin M. Keyes
6539bd6602 Merge #40910 from barrettruth/fix/dir-literal-env-paths 2026-07-26 06:11:01 -04:00
github-actions[bot]
30d5b8098d docs: update version.c #40925
vim-patch:8.2.4761: documentation for using LSP messages is incomplete
vim-patch:8.2.4780: parsing an LSP message fails when it is split
vim-patch:9.0.0979: ch_log() text can be hard to find in the log file
vim-patch:7c948644f runtime(doc): Update the version9.txt with a template for version 9.1 enhancements (#13165)
vim-patch:15935e7f5 runtime(doc): Add a place holder section for version 9.2 (#14060)
vim-patch:1a946044f runtime(doc): correct return types for job_start() and job_status()
vim-patch:1cd31a450 runtime(doc): update return type for job_info()
vim-patch:15141208e runtime(doc): -x is only available when compiled with crypt feature
vim-patch:a37fd7274 runtime(doc): Remove accidental option name highlighting from :help channel.txt
vim-patch:1ff963e15 runtime(doc): Update version9.txt with numbered patches
vim-patch:9.1.2134: Terminal doesn't handle split UTF-8 sequence after ASCII
vim-patch:9.1.2141: Truncation when serializing libsodium encryption parameters
vim-patch:9.1.2145: intstalltutor Makefile target does not create the tutor/sv dir
vim-patch:9.1.2148: [security]: Buffer overflow in netbeans interface
vim-patch:9.2.0021: channel: connection timeout fails to fall back to IPv4
vim-patch:9.2.0314: channel: can bind to all network interfaces
vim-patch:9.2.0317: listener functions do not check secure flag
vim-patch:60e925ca0 runtime(doc): Tweak documentation style in channel.txt
vim-patch:9.2.0843: [security]: popup: opacity mask indexed out of bounds
vim-patch:9.2.0844: [security]: use-after-free on json decode error
vim-patch:9.2.0847: [security]: vimball: code execution via .VimballRecord file
vim-patch:b0e6baab8 Update .gitignore and .hgignore files
vim-patch:9.2.0851: Focus autocommands triggered inconsistently
vim-patch:9.2.0852: GTK: ligatures not correctly displayed
vim-patch:9.2.0853: popup: popup images do not support scaling
vim-patch:3886a8ffc runtime(osc52): don't use osc52 provider if gui is running
vim-patch:f5882d534 CI: Bump the github-actions group across 1 directory with 3 updates
vim-patch:9.2.0856: GTK4: undercurl rendering is inefficient

vim-patch:9.2.0841: [security]: heap overflow when adding > 65535 text properties
vim-patch:9.2.0842: [security]: stack buffer overflow in socket server
2026-07-26 05:46:05 -04:00
Barrett Ruth
3d5de7fd11 fix(buffer): name becomes empty when it is the cwd #40980
Problem: Shortening the name of a buffer whose full name is the current
directory + path sep yields empty string -> buf unnamed.
This doesn't interact well with things like `:mksession`, which
for example could `:badd` with no arg -> E471.

Solution: Keep the full path when shortening yields an empty name, as
`path_try_shorten_fname()` already does.
2026-07-26 05:36:03 -04:00
Christian Clason
62c2538d77 build(deps): bump luajit to a471ab78c 2026-07-26 10:46:05 +02:00
zeertzjq
d57cf6b4fc Merge pull request #40982 from zeertzjq/vim-e2d3e78
vim-patch: runtime file updates
2026-07-26 09:59:03 +08:00
zeertzjq
11cad372ef vim-patch:fb1a2e9: runtime(sh): fix Bash/Ksh array highlighting after an escaped paren
fixes:  vim/vim#18712
closes: vim/vim#20705

fb1a2e9d13

Co-authored-by: frapank <francesco.pankov+github@proton.me>
2026-07-26 09:02:02 +08:00
zeertzjq
43b666cb27 vim-patch:770eb7d: runtime(doc): clarify expandcmd() and "~" behaviour
fixes: vim/vim#20793

770eb7db17

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-07-26 09:01:32 +08:00
zeertzjq
a7bab6121b vim-patch:e2d3e78: runtime(doc): remove incorrect note about spellcapcheck and the first word
'spellcapcheck' checks the first word in the file for a capital like any
sentence start: capcol is seeded to 0 for line 1 in spell_check_sblock().

This has been the case since the feature was added in v7.0100, so the note
that it "doesn't work for the first word in the file" is incorrect.

related: f9184a1d3151b5b727fec86c2ac0946c9c68df4d (code change)
related: 0d9c26dd8333aae4b20015f13fe2e8e1f07037bd (initial doc patch,
         just a few minutes later)
related: vim/vim#20715

e2d3e7818b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-26 09:00:30 +08:00
zeertzjq
e5aac37eb3 Merge pull request #40977 from zeertzjq/vim-9.2.0806
vim-patch:9.2.{partial:0806,0855}
2026-07-26 07:49:47 +08:00
zeertzjq
7ee1bf91ad vim-patch:9.2.0855: 'showcmd' not redrawn with empty mapping triggered on timeout
Problem:  'showcmd' not redrawn with empty mapping triggered on timeout.
Solution: Don't postpone redraw when inside vgetorpeek(). Also move test
          for tabline 'showcmd' to test_tabline.vim.

fixes:  vim/vim#20839
closes: vim/vim#20840

2e9687647a
2026-07-26 07:07:38 +08:00
zeertzjq
a56f4d221e vim-patch:partial:9.2.0806: 'showcmd' may show internal command keys
Problem:  The `showcmd` statusline item may show internal command keys when a
          `<Cmd>` or `<ScriptCmd>` mapping redraws the statusline, and may
          leave stale text behind when `%S` is rendered directly.
Solution: Do not add these internal mapping dispatch keys to the `showcmd`
          buffer, and keep the clear state in sync when `%S` renders it
          (Barrett Ruth)

closes: vim/vim#20769

bd730293dc

Co-authored-by: Barrett Ruth <br@barrettruth.com>
2026-07-26 07:07:35 +08:00
Barrett Ruth
1594ca2368 fix(dir): preserve environment variables in paths 2026-07-25 18:02:55 -05:00
Barrett Ruth
ac4e5460b1 feat(vim.fs): dir(opts.normalize) 2026-07-25 18:02:55 -05:00
Justin M. Keyes
256a88d0ac Merge #40579 from barrettruth/fix/del-keymap-lhs-only-30258 2026-07-25 16:00:25 -04:00
mityu
26fed075ae fix(cmdwin): q: in visual-mode does not insert visual range #40973
Problem: `q:` in visual mode does not insert `'<,'>` automatically in
the current line on cmdwin.

Solution: Insert `'<,'>` in the current line on cmdwin when `q:` is used
in visual mode.
2026-07-25 15:50:31 -04:00
Barrett Ruth
22d44ef875 fix(api): add lhs option for keymap deletion 2026-07-25 10:36:56 -07:00
Barrett Ruth
1facf1e081 fix(gen): parameter order follows the prototype, not the docs 2026-07-25 10:36:55 -07:00
Christian Clason
67cbd76f2c build(deps): bump tree-sitter to 4d0f12699 2026-07-25 19:17:11 +02:00
Barrett Ruth
6ffbb2962c test(api): allow added optional params 2026-07-25 10:01:08 -07:00
Justin M. Keyes
715d8887ec docs: misc #40847
Co-authored-by: Barrett Ruth <br@barrettruth.com>
Co-authored-by: Nathan Zeng <nathan.j.zeng@gmail.com>
2026-07-25 12:47:51 -04:00
Jan Edmund Lazo
43a0258f55 build(vim-patch): detect N/A tags in vimhelp patches #40942
Vim patches for Vim help files must use Vim tags as diff hunk header
to reliably detect if a hunk is N/A or not.
Git does not know which files are Vim help files
so that it can use custom "diff.<filetype>.xfuncname" regexp
to create the header.

Update Neovim's gitattributes to detect Vim help files
and then use it on vim-patch.sh to scan Vim patches.
Add non-function tags from ":h vim_diff"
to detect N/A Vim runtime patches.
2026-07-25 12:16:03 -04:00
Barrett Ruth
4975a186f2 fix(dir): :browse edit opens dir browser #40930
Problem: `:browse edit` (and variants) without an argument fails instead
of opening a browser.

Solution: Dispatch to dir.lua using the cwd as the implied directory.
Replace the inherited GUI-only documentation with the supported
behavior. Support vsplit, split, tabedit variants.
2026-07-25 06:56:52 -04:00
Christian Clason
fb6fb33d39 build(deps): bump luajit to 346ab587c 2026-07-25 10:19:34 +02:00
zeertzjq
20a3bb3325 Merge pull request #40952 from zeertzjq/vim-9.2.0846
vim-patch:9.2.{0846,0854}
2026-07-25 08:25:58 +08:00
zeertzjq
89cab37358 vim-patch:9.2.0854: memory leak when reading a spell file with SN_SAL and SN_SOFO
Problem:  Memory leak when a spell file has an SN_SAL section before an
          SN_SOFO section: set_sofo() reuses sl_sal without freeing the
          salitem_T entries left by read_sal_section() (after v9.2.0846).
Solution: Factor the SAL free loop into free_sal_items() and call it
          before set_sofo() reuses sl_sal.

closes:  vim/vim#20836

Supported by AI.

5a7ce2733a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-25 07:07:43 +08:00
zeertzjq
ba0e5b25bc vim-patch:9.2.0846: [security]: heap buffer overflow in set_sofo()
Problem:  [security]: heap buffer overflow in set_sofo()
          (Yazan Balawneh)
Solution: Reset sl_sal_first (Yasuhiro Matsumoto).

A crafted spell file with an empty SN_SAL section before an SN_SOFO
section reaches set_sofo() with sl_sal_first[] already set to -1 by
set_sal_first(). The counting loop then under-counts colliding
multi-byte "from" characters, allocates an undersized list and writes
past its end.

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-9jqx-hgpr-6v64

05c41c9223

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-07-25 07:07:43 +08:00
zeertzjq
63c84e4c1a vim-patch:9.2.0848: tagfunc "cmd" with a generic Ex command corrupts the tag entry (#40951)
Problem:  When a tagfunc returns a "cmd" that is neither a line number nor
          a search pattern, the tag entry is corrupted: the "kind" field is
          lost and taglist() returns a mangled "cmd".
Solution: Accept any Ex command in "cmd" as in a tags file, terminate a
          generic command with a bar so the trailing fields are preserved,
          and reject a value that cannot be stored in a tag line with E987
          (Hirohito Higashi).

fixes:   vim/vim#20781
related: vim/vim#20790
closes:  vim/vim#20828

86adef19fc

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2026-07-25 07:07:22 +08:00
zeertzjq
0e1a24836d Merge pull request #40950 from zeertzjq/vim-9.2.0845
vim-patch: runtime file updates
2026-07-25 06:56:32 +08:00
zeertzjq
db41e4c74f vim-patch:0c1a214: runtime(doc): Fix truncated sentence in :h map()
fixes: vim/vim#20725

0c1a214497

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-25 06:32:03 +08:00
zeertzjq
19c89b6d68 vim-patch:9.2.0849: filetype: osquery config files are not recognized
Problem:  filetype: osquery config files are not recognized.
Solution: Detect osquery.conf as jsonc filetype (Fionn Fitzmaurice).

Reference:
https://osquery.readthedocs.io/en/stable/deployment/configuration/#configuration-components

closes: vim/vim#20826

ea183ce4e5

Co-authored-by: Fionn Fitzmaurice <fionn@github.com>
2026-07-25 06:29:04 +08:00
zeertzjq
2fb28fdcb6 vim-patch:e298a57: runtime(iar): Add iar compiler plugin
closes: vim/vim#20830

e298a57353

Co-authored-by: Andrey Starodoubtsev <andrey.starodoubtsev@gehealthcare.com>
2026-07-25 06:26:55 +08:00
zeertzjq
77b0476f40 vim-patch:e9234b9: runtime(go): update Go syntax file
Update the Go syntax file with some recent changes made to vim-go to
correctly highlight the second and later lines of concatenated strings
in var or const blocks.

closes: vim/vim#20835

e9234b9b4a

Co-authored-by: Billie Cleek <bhcleek@gmail.com>
2026-07-25 06:26:41 +08:00
zeertzjq
72b2c713ea vim-patch:9.2.0845: [security]: arbitrary Ex command execution during C omni-completion
Problem:  [security]: arbitrary Ex command execution during C
          omni-completion (Threonine)
Solution: Match tags typeref literally to block Ex command injection
          (Yasuhiro Matsumoto).

Escaping only "/" and "\" left the typeref able to break out of the
:vimgrep pattern without a "/": an unclosed "[" makes vimgrep's pattern
skipping fail, and the parser then treats a following "|" as a command
separator, so the tag value runs as Ex commands during C omni-completion.
Match the field literally with \V so no regex metacharacter can affect
pattern parsing.

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-cx73-phcg-3j5g

2f628d8104

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-07-25 06:23:13 +08:00
phanium
a99d0c6810 build: support variant builds via env-var and cpack overrides #40947
Problem: scripts/genappimage.sh runs `make` with no extra flags and
emits a fixed nvim-linux-<arch>.appimage filename, so packaging a
variant build (e.g. with the bundled PUC-Rio Lua interpreter)
requires editing the Makefile or post-renaming the AppImage, which
breaks the AppImage zsync URL.

Solution: forward DEPS_CMAKE_FLAGS and CMAKE_EXTRA_FLAGS to `make`,
accept OUTPUT so the AppImage (and its zsync Filename:) follows the
caller's chosen name, and mark CPACK_PACKAGE_FILE_NAME as CACHE
STRING on Linux so the resulting tarball/deb follow as well. Default
behavior is unchanged when none of these env vars are set.
2026-07-24 13:55:36 -04:00
Justin M. Keyes
bf3d4210c3 refactor: 'previewpopup' #40945
- drop w_maxwidth/w_maxheight, calculate them on-demand from
  'previewpopup' (this is cheap bc of `opt_keyset`)
2026-07-24 13:49:47 -04:00
Olivia Kinnear
bb104ba4db feat(health): improvements to :checkhealth #40935
Changes:
- Removed the blank line before the first healthcheck header.
- Fixed a bug where the entire "Terminal" section of `vim.health` would
  not appear if the `infocmp` executable was not found.
- Fixed a typo in `vim.lsp` when displaying the LSP log level.
2026-07-24 11:54:12 -04:00
dependabot[bot]
20f44076dc 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 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v7...v7.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-24 14:41:37 +02:00
Jan Edmund Lazo
3d5d2ad4a9 fix(vim-patch.sh): omit gpg for git-log #37173
"vim-patch.sh -L" includes gpg signature for "log.showSignature=true"
in user's .gitconfig.
vim-patch.sh expects no signature for 1-line output per patch.
2026-07-24 08:37:47 -04:00
Justin M. Keyes
e533ec5160 Merge #40924 from justinmk/optdict 2026-07-24 07:36:52 -04:00
Justin M. Keyes
c244a4bace refactor(options): rename, simplify 2026-07-24 13:05:20 +02:00
Justin M. Keyes
9604c758b3 perf(options): no-alloc keysets 2026-07-24 13:05:20 +02:00