Commit Graph
35019 Commits
Author SHA1 Message Date
zeertzjqandChristian Brabandt 074ca976de vim-patch:16c2279: runtime(sh): highlight single-dash short options containing digits
fixes: vim/vim#19082

https://github.com/vim/vim/commit/16c22790627f063981ce75ef3d4da1eb4f6bf8d0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-16 07:27:30 +08:00
zeertzjqandWu Yongwei d423dd8b8b vim-patch:5529b75: runtime(c): Do not highlight noreturn in C++ code
closes: vim/vim#19170

https://github.com/vim/vim/commit/5529b750a7ce6dcafaecb119d674b99275dbe3c7

Co-authored-by: Wu Yongwei <wuyongwei@gmail.com>
2026-01-16 07:27:18 +08:00
zeertzjqandSimão Afonso b94061a71d vim-patch:f25c343: runtime(csh): Support negated if in matchit
Currently, the matchit configuration chokes on valid syntax like:

```csh
if !(true) then
   true
endif
```

Make sure the negation syntax is supported.

closes: vim/vim#19172

https://github.com/vim/vim/commit/f25c343b2639d393544106c21b3b0b58caa3adca

Co-authored-by: Simão Afonso <simao.afonso@powertools-tech.com>
2026-01-16 07:27:08 +08:00
zeertzjqandPatrick Meiser-Knosowski 5144d802c3 vim-patch:f8cde69: runtime(rapid): Update syntax file for ABB Rapid
Also remove trailing white spaces.

closes: vim/vim#19175

https://github.com/vim/vim/commit/f8cde697887128f2df6b9ba1b5aaa230fa8f10a4

Co-authored-by: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
2026-01-16 07:26:59 +08:00
zeertzjqandMathis Bernadet d01f1f379c vim-patch:4969b8d: runtime(mbsync): Add syntax highlighting for TLSVersions keyword
mbsync deprecated SSLVersions. Now use TLSVersions (we keep
computability with SSLVersions).

closes: vim/vim#19179

https://github.com/vim/vim/commit/4969b8db4a46f053bad7f912f27967cc7f620aea

Co-authored-by: Mathis Bernadet <matbernadet@emi.u-bordeaux.fr>
2026-01-16 07:26:48 +08:00
zeertzjqandBjoern Foersterling 182a8f08b2 vim-patch:af973d4: runtime(yaml): fix indentation script
Problem:  The indentation of Ansible Playbooks gets messed up after
          gg=G (after 9179ddc0608813e)
Solution: Remove one shiftwidth() that seems to be misplaced.

closes: vim/vim#19180

https://github.com/vim/vim/commit/af973d401803fb1110f699ced6df45b74fcaed2b

Co-authored-by: Bjoern Foersterling <bjoern.foersterling@gmail.com>
2026-01-16 07:25:46 +08:00
Sean Dewar ba1d50fdc3 vim-patch:9.1.2086: Memory leak when skipping invalid literal dict
Problem:  memory leak when not evaluating (just parsing) invalid literal
          dict.
Solution: Always clear the key's typval (Sean Dewar)

Though "check_typval_is_value(&tv) == FAIL && !evaluate" is maybe never
true, also always clear tvs if check_typval_is_value fails; at worst
this would be a no-op as their initial types are VAR_UNKNOWN.

closes: vim/vim#19178

https://github.com/vim/vim/commit/b10a3e1a20c444ffea34be820e8ceba4b2503287

check_typval_is_value change is for Vim9 script. (from 9.0.2163)

N/A patch:
vim-patch:9.0.2163: Vim9: type can be assigned to list/dict

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
2026-01-15 23:21:33 +00:00
Sean Dewar 7e2e116343 fix(api): nvim_get_option_value dummy buffer crashes
Problem: nvim_get_option_value with "filetype" set can crash if autocommands
open the dummy buffer in more windows, or if &bufhidden == "wipe".

Solution: Attempt to close all dummy buffer windows before wiping. Promote the
dummy buffer to a normal buffer if that fails.
2026-01-15 20:08:45 +00:00
Sean Dewar 40114d1631 refactor: remove dead code, adjust comment
Removed code doesn't seem to do anything? Looks like a clobbered remnant from
when do_filetype_autocmd lived in did_set_string_option.

Doc comment for wipe_buffer doesn't decrement top_file_num since a2d25b7 (2016),
which presumably means the comment on marks doesn't apply either. (fmark_T::fnum
can't refer to the wrong buffer as numbers aren't reused here anymore)
2026-01-15 20:08:45 +00:00
Sean Dewar 3cb462a960 fix(api): autocmds mess up nvim_get_option_value's dummy buffer
Problem: When the "filetype" key is set for nvim_get_option_value, autocommands
can crash Nvim by prematurely wiping the dummy buffer, or cause options intended
for it to instead be set for unrelated buffers if switched during OptionSet.

Solution: Don't crash. Also quash side-effects from setting the buffer options.
2026-01-15 20:08:45 +00:00
bfredl 6082b7f850 Merge pull request #37040 from p00f/push-nwlkmnvmmlrt
feat(build.zig): add option to use system dependencies
2026-01-15 11:07:40 +01:00
zeertzjq 405c6c9bb0 Merge pull request #37403 from zeertzjq/vim-9.1.0700
vim-patch:9.1.{0700,0701,0702,0703}
2026-01-15 14:51:13 +08:00
zeertzjqandChristian Brabandt 094d3dd3d4 vim-patch:9.1.0703: crash with 2byte encoding and glob2regpat()
Problem:  possible crash with 2-byte encoding and glob2regpat()
          (after v9.1.0700, v9.1.0702)
Solution: include both bytes for a multi-byte character for an
          escaped character

closes: vim/vim#15590

https://github.com/vim/vim/commit/c9bfed2fda8c23cc02325b1a7a6d84dc62bbea4b

DBCS 'encoding' is N/A.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-15 14:15:36 +08:00
zeertzjqandChristian Brabandt 8c31b3eeac vim-patch:9.1.0702: Patch 9.1.0700 broke CI
Problem:  Patch 9.1.0700 broke CI
Solution: Revert for now

https://github.com/vim/vim/commit/f459d68ecfe40875da863bee100c45cb80e19b87

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-15 14:15:36 +08:00
zeertzjqandChristian Brabandt 0de85e322a vim-patch:9.1.0701: crash with NFA regex engine when searching for composing chars
Problem:  crash with NFA regex engine when searching for composing chars
          (SuyueGuo)
Solution: When there is no composing character, break out of the loop
          and check that out1 state is not null

fixes: vim/vim#15583

https://github.com/vim/vim/commit/c3a02d78bd7a4622e85af348b24fb1388d160de1

Test uses DBCS 'encoding', which is N/A.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-15 14:15:36 +08:00
zeertzjqandChristian Brabandt 11b3699252 vim-patch:9.1.0700: crash with 2byte encoding and glob2regpat()
Problem:  possible crash with 2byte encoding and glob2regpat()
Solution: Skip over character, if it is multi-byte character

https://github.com/vim/vim/commit/1c815b54bbaf872c271d58043e51e56b908c1a20

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-15 14:15:36 +08:00
Jan Edmund LazoandChristian Brabandt 5042394241 vim-patch:9.1.0697: [security]: heap-buffer-overflow in ins_typebuf (#37372)
Problem:  heap-buffer-overflow in ins_typebuf
          (SuyueGuo)
Solution: When flushing the typeahead buffer, validate that there
          is enough space left

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-4ghr-c62x-cqfh

https://github.com/vim/vim/commit/322ba9108612bead5eb7731ccb66763dec69ef1b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-15 13:35:21 +08:00
ashab-k 86c939ba91 fix(treesitter): fix spell navigation on first line (#37361)
Problem:  Spell navigation skips words on the first line because
          _on_spell_nav passes an empty range (0,0) to the highlighter.

Solution: Use math.max(erow, srow + 1) to ensure a valid search window.

Signed-off-by: ashab-k <ashabkhan2000@gmail.com>
2026-01-15 10:20:24 +08:00
zeertzjq 4451adbf84 Merge pull request #37325 from zeertzjq/term-poll
fix(process): don't limit PTY master remaining data size
2026-01-15 09:57:12 +08:00
zeertzjq e051718908 fix(process): don't limit PTY master remaining data size 2026-01-15 09:32:10 +08:00
zeertzjq 75c8f75501 refactor(process): don't read from PTY master using uv_pipe_t
Using uv_pipe_t to read from PTY master may drop data if the PTY process
exits immediately after output, as libuv treats a partial read after
POLLHUP as EOF, which isn't true for PTY master on Linux. Therefore use
uv_poll_t instead.

This commit can be reverted if libuv/libuv#4992 is fixed for uv_pipe_t.
2026-01-15 09:32:10 +08:00
zeertzjq 896968cad1 refactor(event/stream.c): fix confusing indent (#37398) 2026-01-15 01:00:55 +00:00
Justin M. Keyes 994444571e test: remove non-actionable tests from "pending" list #37384
Problem:
`t.skip()` adds to the "pending" list. If there is no path to fixing
a pending test, it adds noise to the pending list.

Solution:
Return early instead of using `t.skip()`.
2026-01-14 19:25:11 -05:00
zeertzjq cabf82be5a test(lsp/diagnostic_spec): fix creating unused clients (#37397)
Fix #36793

Also fix some `integer?` -> `integer` conversion warnings while at it.
2026-01-15 00:23:55 +00:00
Chinmay Dalal 8df6e5ea92 docs(build.zig): document zig build 2026-01-14 13:16:38 -05:00
Chinmay Dalal 5ec0c1ca07 feat(build.zig): install parsers in install step
Problem: The install step does not install parsers
Solution: Make the install step depend on installing parsers
2026-01-14 13:16:38 -05:00
zeertzjq 83552847f3 Merge pull request #37389 from zeertzjq/vim-9.1.2085
vim-patch:partial:9.0.0907,9.1.{1323,2023,2085}
2026-01-14 14:19:37 +08:00
zeertzjqandChristian Brabandt 40fb2818b6 vim-patch:9.1.2085: Use-after-free in winframe_remove()
Problem:  Use-after-free in winframe_remove() (henices)
Solution: Set window_layout_locked() inside winframe_remove()
          and check that writing diff files is disallowed when the
          window layout is locked.

It can happen with a custom diff expression when removing a window:

 1. Buffer was removed, so win_frame_remove() is called to remove the
    window.
 2. win_frame_remove() → frame_new_height() → scroll_to_fraction()
    → diff_check_fill() (checks for filler lines)
 3. diff_check_fill() ends up causing a diff_try_update, and because we
    are not using internal diff, it has to first write the file to a
    buffer using buf_write()
 4. buf_write() is called for a buffer that is not contained within a
    window, so it first calls aucmd_prepbuf() to create a new temporary
    window before writing the buffer and then later calls
    aucmd_restbuf(), which restores the previous window layout, calling
    winframe_remove() again, which will free the window/frame structure,
    eventually freeing stuff that will still be accessed at step 2.

closes: vim/vim#19064

https://github.com/vim/vim/commit/ead1dda74a485ef0470e7252d07c1a36b8cde517

Nvim doesn't have this bug as Nvim uses a floating window as autocommand
window, and removing it doesn't need winframe_remove().

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-14 13:56:01 +08:00
zeertzjqandChristian Brabandt 6fa2ebec6b vim-patch:9.1.2023: [security]: Use-after-free in alist_add() with nasty autocmd
Problem:  A BufAdd autocommand may cause alist_add() to use freed
          memory, this is caused by the w_locked variable unset too
          early (henices)
Solution: in trigger_undo_ftplugin() only set w_locked to false, if it
          was false when calling the function.

related: v9.1.0678
closes: vim/vim#19023

https://github.com/vim/vim/commit/9266a2a19790dd3485b1dd32b3e27ba1d93e33d0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-14 13:56:01 +08:00
zeertzjqandChristian Brabandt 328640aed0 vim-patch:9.1.1323: b:undo_ftplugin not executed when re-using buffer
Problem:  b:undo_ftplugin not executed when re-using buffer
          (archy3)
Solution: explicitly execute b:undo_ftplugin in buflist_new() when
          re-using the current buffer

fixes: vim/vim#17113
closes: vim/vim#17133

https://github.com/vim/vim/commit/baa8c90cc0d214e036a3a7980d5cf95cae88a68d

Cherry-pick test_filetype.vim changes from patch 9.1.1325.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-14 13:56:01 +08:00
zeertzjqandBram Moolenaar 92596a37e7 vim-patch:partial:9.0.0907: restoring window after WinScrolled may fail
Problem:    Restoring window after WinScrolled may fail.
Solution:   Lock the window layout when triggering WinScrolled.

https://github.com/vim/vim/commit/d63a85592cef0ee4f0fec5efe2f8d66b31f01f05

Only check close_disallowed in window_layout_locked() for now.
Also don't check window_layout_locked() when closing a floating window,
as it's not checked when creating a floating window.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-01-14 13:56:00 +08:00
Chinmay Dalal 41bc3020c4 fix(build.zig): format build.zig to keep lines under 100 chars 2026-01-13 22:09:03 -05:00
Chinmay Dalal b618511ef9 fix(editorconfig): use 4 spaces indentation for zig files 2026-01-13 22:09:03 -05:00
Chinmay Dalal 6d9031390c feat(build.zig): add option to use system dependencies
Problem:
build.zig always downloads dependencies and statically links them,
which is frowned upon by distro packagers.

Solution:
Add option to use system libraries.
2026-01-13 22:09:03 -05:00
zeertzjq dddc359213 test(client): check for uv.run() failure (#37379)
Related #37376
2026-01-14 08:00:37 +08:00
zeertzjq bb0f28f20b Merge pull request #37385 from zeertzjq/vim-ec46b9d
vim-patch: runtime file updates
2026-01-14 07:39:33 +08:00
zeertzjqandMateo Gjika 6869d0698f vim-patch:17d60ce: runtime(compiler): add compiler plugin for cabal
closes: vim/vim#19152

https://github.com/vim/vim/commit/17d60cee555ec36e62492793159f9051218a6bd9

Co-authored-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
2026-01-14 07:12:48 +08:00
zeertzjqandKnoP-01 3f10748a07 vim-patch:c2f453f: runtime(krl): Update syntax file for Kuka Robot Language
closes: vim/vim#19171

https://github.com/vim/vim/commit/c2f453f5f35dfbef3b134ee16755f7afe1c7279c

Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
2026-01-14 07:12:28 +08:00
zeertzjqandJon Parise 3ad9e6254b vim-patch:ec46b9d: runtime(matchit): include minor improvement from chrisbra/matchit
In particular, documentation update from
related: chrisbra/matchit#55

https://github.com/vim/vim/commit/ec46b9d4f2f5a5b36438215aae46c197688d86ac

Co-authored-by: Jon Parise <jon@indelible.org>
2026-01-14 07:11:32 +08:00
bfredl 686a9edd38 Merge pull request #35991 from bfredl/neopipe
fix(shell): ceci n'est pas une pipe
2026-01-13 10:31:32 +01:00
bfredl 5581a53437 fix(shell): ceci n'est pas une pipe
On linux /dev/stdin is defined as a symlink to /proc/self/fd/0
This in turn is defined as a "magic" symlink which is allowed to point
to internal kernel objects which really does not have a file
name. As a glaring inconsistency, fopen("/proc/self/fd/0", "r")
works if fd was originally opened using pipe() but not using
socketpair(). As it happens UV_CREATE_PIPE does not create pipes
but creates socket pairs. These two unfortunate conditions
means that using /dev/stdin and similar does not work in
shell commands in nvim on linux. as a work around, override
libuv's descicion and create an actual pipe pair.

This change is not needed on BSD:s but done unconditionally for simplicity,
except for on windows where it is not done for stdout because of windows

fixes #35984
2026-01-13 09:41:51 +01:00
Justin M. Keyes 9afd81512b Merge #37377 from echasnovski/pack-fix-checkout 2026-01-13 00:07:09 -05:00
Evgeni Chasnovski bac4cde9cd fix(pack): actually checkout proper version of submodules
Problem: Installing plugin with submodules doesn't check out their
  state (due to `git clone --no-checkout` to not end up with default
  branch code in case of invalid `version`).

  Updating a plugin with submodules doesn't update their state.

Solution: Update `git_checkout` helper to account for submodules.
  Another approach would be `git checkout --recurse-submodules ...`,
  but that doesn't seem to allow `--filter=blob:none` for submodules,
  which is nice to have.

  Also make `git_clone` wrapper simpler since `--no-checkout` makes
  `--recurse-submodules` and `--also-filter-submodules` do nothing.
2026-01-12 22:57:38 +02:00
Evgeni Chasnovski 09edb145f5 test(pack): adjust add startup tests to just sleep with longer timeout
Problem: The `add` startup tests mock startup process which requires
  *some* amount of time to be done. Previous solution with `vim.wait`
  to wait just enough time to register that startup script has finished
  doesn't seem to work as intended (it just wait full time). Its timeout
  is also seems to be barely enough to pass on Windows CI. Which will be
  a problem with more `git` actions done on startup in the future/next
  commit.

Solution: Just sleep predetermined amount of time and explicitly check
  if startup script finished executing.
2026-01-12 22:30:56 +02:00
Tristan Knight d2ca90d87e fix(glob): handle numeric literals in pattern matching (#37257)
Problem:
vim.glob.to_lpeg() errors when patterns contain numeric literals
(like the '1' in '.ps*1') because LPeg interprets numeric strings
as indexed grammar rule references. For example:
  vim.glob.to_lpeg('.ps*1')
  E5108: Lua: rule '1' undefined in given grammar

Solution:
Prefix all rule names with '_' in the end_seg() function to prevent
literal numbers from being interpreted as LPeg indexed rules. This
ensures pattern components like '1', '2', etc. are treated as
regular rule names rather than special references.
2026-01-12 10:58:01 -08:00
Evgeni Chasnovski 8f0b8a2c27 fix(pack): skip git stash during install
Problem: Installing plugin is done via `git clone --no-checkout ...`
  (to not end up with default branch code in case of invalid `version`).
  This leaves cloned repo in a state that `git stash` will actually add
  an entry to the stash list. Although not critical, better to not have
  that if possible.

Solution: explicitly skip `git stash` step in checkout during install.
2026-01-12 15:53:36 +02:00
Jan Edmund Lazo 025c0c34ce build(vim-patch): Vim9 comment plugin is N/A (#37370)
Nvim has builtin 'gc' commenting, instead of bundling
https://github.com/tpope/vim-commentary, partly for treesitter.
Vim9 comment plugin, runtime/pack/dist/opt/comment/ seems to be based on
https://github.com/habamax/.vim/blob/master/autoload/comment.vim
which is similar to vim-commentary.

test/functional/lua/comment_spec.lua has enough tests to justify
skipping test_plugin_comment.vim.
Vim's terminal + packadd + Vim9 test files is a chore to manually port.

- https://github.com/neovim/neovim/commit/73de98256cf3932dca156fbfd0c82c1cc10d487e
- https://github.com/vim/vim/pull/14634
2026-01-12 07:03:25 +00:00
7a6e8d4430 docs: misc (#37281)
Close #37289
Close #37348

Co-authored-by: Marc Jakobi <marc@jakobi.dev>
Co-authored-by: Anton Kesy <anton@kesy.de>
2026-01-12 03:50:57 +00:00
zeertzjqandAnton Kesy e790c87cd8 vim-patch:9.1.2078: A few more typos in various files (#37368)
Problem:  A few more typos in various files
Solution: Fix those (zeertzjq, antonkesy)

related: neovim/neovim#37348
closes:  vim/vim#19153

https://github.com/vim/vim/commit/6a2b5b2246833f7922e38eabab7090e29e89c3a1

Co-authored-by: Anton Kesy <anton@kesy.de>
2026-01-12 01:27:03 +00:00
zeertzjqandDoug Kearns e01c42b43d vim-patch:c4dc4d8: runtime(syntax-tests): Add :help command termination tests (#37366)
Problem:  The :help command lacks command termination tests.
Solution: Add tests for command termination at "|", "^M" and "^J".

- Check special handling of "|" in arguments.
- Update the Vim syntax file.

closes: vim/vim#18932

https://github.com/vim/vim/commit/c4dc4d8f1eca8e3989c5f7770b062e3cf344a936

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-01-12 01:15:02 +00:00