Commit Graph

34988 Commits

Author SHA1 Message Date
zeertzjq
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

9266a2a197

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-14 13:56:01 +08:00
zeertzjq
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

baa8c90cc0

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
zeertzjq
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.

d63a85592c

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
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
zeertzjq
6869d0698f vim-patch:17d60ce: runtime(compiler): add compiler plugin for cabal
closes: vim/vim#19152

17d60cee55

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

c2f453f5f3

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

ec46b9d4f2

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.

- 73de98256c
- https://github.com/vim/vim/pull/14634
2026-01-12 07:03:25 +00:00
zeertzjq
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
zeertzjq
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

6a2b5b2246

Co-authored-by: Anton Kesy <anton@kesy.de>
2026-01-12 01:27:03 +00:00
zeertzjq
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

c4dc4d8f1e

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-01-12 01:15:02 +00:00
zeertzjq
4399250e90 fix(channel): unreference list after callback finishes (#37358) 2026-01-12 00:33:19 +00:00
zeertzjq
a4ee34a165 vim-patch:be62259: runtime(rst): set suffixesadd for rst (#37365)
Add .rst to suffixesadd. This allows gf and similar commands to work for
rst documentation such as in the linux kernel Documentation.

closes: vim/vim#19149

be6225976c

Co-authored-by: Anakin Childerhose <anakin@childerhose.ca>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-12 08:21:07 +08:00
zeertzjq
aed1f8c377 vim-patch:9.1.2079: use-after-free with 'qftf' wiping buffer (#37364)
Problem:  use-after-free with 'quickfixtextfunc' wiping buffer
          (henices)
Solution: Evaluate 'quickfixtextfunc' with textlock enabled.

closes: vim/vim#19142

300ea1133f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-12 07:04:36 +08:00
Robert Muir
1629493f72 perf(lsp): avoid textDocument/definition requests during tag completion (#37260)
Problem:
vim.lsp.tagfunc looks for the presence of 'c' (cursor) flag and issues
sync textDocument/definition requests to all clients, otherwise
workspace/symbol requests. But 'c' flag can also be set during the
insert mode completion, e.g. with an empty tag completion query, the tag
func receives pattern of '\<\k\k' with flags 'cir'.

Solution:
check for 'i' (insert mode completion) flag and don't issue any LSP
requests, return vim.NIL for immediate fallback to tags.
2026-01-11 14:41:26 -08:00
zeertzjq
94144d4678 fix(lua): vim._with() doesn't save boolean options properly (#37354)
Problem:  vim._with() doesn't save boolean options with false values
          properly.
Solution: Use vim.F.if_nil().
2026-01-11 20:04:32 +08:00
Christian Clason
cd0d26daf9 Revert "docs(gh): replace gitter with discussion link"
This reverts commit a296fcfed4.
2026-01-11 12:09:04 +01:00
Christian Clason
a296fcfed4 docs(gh): replace gitter with discussion link 2026-01-11 12:08:24 +01:00
zeertzjq
39d8aa0a1a fix(rpc): don't overwrite already received results on error (#37339)
This fixes a regression from cf6f60ce4d
(possibly), as before that commit a frame is popped from the call stack
immediately after its response is received.

Also fix leaking the allocated error messages.
2026-01-11 17:40:32 +08:00
zeertzjq
ba7e17160d vim-patch:69075d3: runtime(compiler): Do not set title in pandoc compiler (#37347)
closes: vim/vim#19048

69075d35be

Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
2026-01-10 23:24:37 +00:00
zeertzjq
175b27b1c5 Merge pull request #37346 from zeertzjq/vim-9.1.2071
vim-patch:9.1.{2071,2075}
2026-01-11 07:23:03 +08:00
zeertzjq
2ae56fbb39 vim-patch:9.1.2075: tests: wrong change to test_ins_complete.vim
Problem:  tests: wrong change to test_ins_complete.vim
          (zeertzjq, after v9.1.2071)
Solution: Revert unintentional changes

28fd7e7702

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-11 06:51:04 +08:00
zeertzjq
562bc0b371 vim-patch:9.1.2071: tests: test_ins_complete.vim leaves swapfiles behind
Problem:  tests: test_ins_complete.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!

closes: vim/vim#19137

0e0cb8520c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-11 06:50:35 +08:00
zeertzjq
2d3dc070ce fix(session): window sizes not stored with float windows (#37344) 2026-01-10 14:28:45 +00:00
Christian Clason
df2323da70 build(deps): bump luajit to 707c12bf0 2026-01-10 11:12:52 +01:00
glepnir
634f6424aa fix(completion): set 'wrap' and scrolloff=0 in preview window (#37327)
Problem: info/preview floating windows are created
without wrap enabled, causing info text to be
truncated.

Solution: enable 'wrap' and set 'scrolloff' to 0 by
default, like vim's popup_create does.
2026-01-10 16:31:01 +08:00
glepnir
63cbc95d45 fix(api): nvim_set_current_win doesn't reset Visual mode (#37340)
Problem:
Using nvim_set_current_win() to switch windows while in Visual mode
causes E315 ml_get error when target buffer has fewer lines. This
doesn't happen with `:wincmd w` since it properly resets Visual mode
when switching buffers.

Solution:
Reset Visual mode when switching to another buffer, like `:wincmd w`.
2026-01-10 05:49:46 +00:00
zeertzjq
cb77bd1b86 test(server_notifications_spec): improve chanclose test (#37337)
Check that a pending event is actually cancelled, in place of the
nvim_subscribe that was removed in #28487.
2026-01-10 04:12:06 +00:00
zeertzjq
295fb3fdb2 fix(terminal): :edit should respect 'bufhidden' with exited job (#37301) 2026-01-10 08:25:49 +08:00
zeertzjq
d1f7672bc9 vim-patch:fc00006: runtime(sieve): preserve existing line endings in ftplugin (#37334)
Only set fileformat=dos for new files; preserve existing line endings
when editing. This satisfies RFC 5228 for new files while avoiding
issues with version control and existing workflows.

The previous change (3cb4148) unconditionally set fileformat=dos, which
converts existing files with LF line endings to CRLF on save. This
causes issues with version control (entire file appears changed) and
breaks workflows where sieve files are stored with unix line endings.

Dovecot Pigeonhole (the main sieve implementation) has explicitly
accepted LF line endings since 2008 (commit 97b967b5):
  /* Loose LF is allowed (non-standard) and converted to CRLF */
This behavior has remained unchanged for almost 18 years.

closes: vim/vim#19144

fc00006777

Co-authored-by: André-Patrick Bubel <code@apb.name>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 08:07:58 +08:00
zeertzjq
aee7c1feac vim-patch:27e5d95: runtime(lynx): Update syntax file (#37333)
Update for Lynx version 2.9.2.

closes: vim/vim#19141

27e5d95edf

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-01-10 08:07:02 +08:00
zeertzjq
aa959f7b85 vim-patch:9.1.2069: Search wrap indicator not shown w/out 'shm-S' (#37332)
Problem:  when shortmess doesn't have 'S', backward search wrap doesn't
          show the "W" before count. forward search works fine but
          backward fails because the position check logic is backwards -
          it checks if cursor < pos instead of using the existing
          wrapped flag.
Solution: Use sia->sa_wrapped flag that searchit() already sets
          correctly (glepnir).

fixes:  vim/vim#5280
closes: vim/vim#19138

ccb7b43365

Co-authored-by: glepnir <glephunter@gmail.com>
2026-01-10 08:03:10 +08:00
zeertzjq
930817f100 vim-patch:9.1.2070: completion: autocomplete breaks with large dict (#37331)
Problem:  Autocomplete breaks ":help" when 'dict' points to a large file
          (lxhillwind)
Solution: Reset autocompletion timer expiry flag (Girish Palya)

fixes:  vim/vim#19130
closes: vim/vim#19137

a9711b5395

Co-authored-by: Girish Palya <girishji@gmail.com>
2026-01-10 07:07:24 +08:00
zeertzjq
46f83dc271 vim-patch:536ee91: runtime(doc): add termdebug tag (#37321)
vim-patch:536ee91: runtime(doc): add termdebug tag, remove term "floating window"

Problem:
- When I type `:h termdebug`, I will expect to see the introduction of
  the termdebug plugin. But instead, it shows me document of
  `termdebug_wide`, and I have to scroll up quite much to find the
  introduction.
- `:h popup` says `floating-window`? Why? As I have tried both features
  (of Vim and Neovim), I think they are _very different_ things, even
  more different than job features in Vim and Neovim.

Solution:
- In `:h terminal.txt`, add tag `*termdebug*` to the introduction of
  termdebug plugin.
- In `:h popup.txt`, "floating window" -> "popup window".

closes: vim/vim#19135

536ee91189

Change the title ":Termdebug plugin" to simply ":Termdebug", otherwise
the line is too long.

Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
2026-01-10 07:05:28 +08:00
Yochem van Rosmalen
f19653e370 fix(health): emit Progress message #37123
Problem:
The `"Running healthchecks..."` message doesn't inform the user much and
is a hack from before we got a way to emit actual progress messages.

Solution:
Use `nvim_echo` to emit progress messages showing the name of the report
that is currently running.
2026-01-09 17:00:09 -05:00
zeertzjq
445cb751e6 fix(pum): pumborder=shadow not blending properly (#37328)
Problem:  Setting pumborder=shadow doesn't blend proerly.
Solution: Check fconfig.shadow when setting pum_grid.blending, like what
          is done in check_blending().
2026-01-09 11:52:59 +00:00
Christian Clason
0aabe7ae76 feat(inspect): update to a8ca312
Sync with upstream commit a8ca3120df
2026-01-09 10:07:15 +01:00
Yochem van Rosmalen
b23e99e051 docs: remove ICCF Holland URL (#37230)
Problem:
ICCF Holland is dissolved by the end of 2025 ^1 and sponsorships are
transferred to Kuwasha (https://kuwasha.net). Their SSL certificate is
already expired, so the https URL mentioned in the intro text doesn't
work anymore. Reported by https://github.com/neovim/neovim/issues/36597#issue-3635391949.

Solution:
URL is removed from the text. We'll keep the vim.org URL for now as it
points to the same information.

[^1]: See June 2025 news on https://iccf-holland.org/index.html
2026-01-09 16:38:26 +08:00
zeertzjq
272ec9627c refactor(fileio.c): avoid downcasting in {read,write}_eintr() (#37323) 2026-01-09 11:54:22 +08:00
zeertzjq
425ead214a Merge pull request #37320 from zeertzjq/vim-9179ddc
vim-patch: runtime file updates
2026-01-09 10:27:49 +08:00
zeertzjq
af7925ec58 vim-patch:335aecd: runtime(cpp): Fix c++ float and integer literal syntax highlighting
closes: vim/vim#8939

335aecd98f

Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2026-01-09 09:39:35 +08:00
zeertzjq
9ca69488cf vim-patch:e80a4ed: runtime(matchit): Update to Release 1.21
closes: vim/vim#19109

e80a4ed845

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-09 09:39:19 +08:00