981 Commits

Author SHA1 Message Date
Justin M. Keyes
17f13ab338 Merge #40473 from janlazo/vimpatch_na_cfuncs
build(vim-patch): detect N/A C files based on diff
2026-07-12 12:13:20 -04:00
Justin M. Keyes
81c4c295ac refactor(insert): rename edit.c => insert.c #40705
Problem:
- `edit.c` is an unnecessarily misleading and less-discoverable name
  than `insert.c`.
- Numerous insert-mode related things are named with a `ins_` prefix.
- There is already a `insexpand.c` module...

Solution:
Rename `edit.c` => `insert.c`.
2026-07-12 11:57:17 -04:00
Justin M. Keyes
d25ae8b8c2 refactor(input): rename getchar.c => input.c #40698
Problem:
`getchar.c` is a quirky name and doesn't align with our existing
`os/input.c` and `tui/input.c` modules, which encompass the same topic
at different layers.

Solution:
Rename `getchar.c` => `input.c` for discoverability.

Introduce `dialog.c` for functionality related to showing confirm
prompts, dialogs, etc.
2026-07-12 08:34:13 -04:00
Jan Edmund Lazo
4713f0e9eb build(vim-patch): N/A option callbacks
':h vim-diff' lists N/A options.
Vim triggers callbacks when updating some of these options
(ie. compatible).
These callbacks are N/A.
2026-07-06 14:23:54 -04:00
Jan Edmund Lazo
e618d279b8 build(vim-patch): version.c "included_patches[]" is N/A
Nvim relies on commit history for automated updates
to ported Vim patches across Vim releases via "included_patchsets[]".
Each Vim commit is suppose to manually adjust "included_patches[]"
but it is prone to human error such that vim-patch.sh found
the following N/A commits:

```
495282b6e Correct list of patch numbers
85d9b03f8 Correct list of patches.
```

Prior to this commit, vim-patch doesn't find the following N/A commit:

```
9.0.2172: Vim9: compiling :defer may fail
```

https://github.com/neovim/neovim/pull/40519#issuecomment-4850337525
2026-07-06 09:51:27 -04:00
Jan Edmund Lazo
384a9c451a build(vim-patch): detect N/A C files based on diff
vim_na_cfuncs.txt lists Vim C functions that are N/A to Nvim.
Listed in 'src/proto/*.proto' files.
Based on ':h vim-diff'.

- features (ie. balloon, tabpanel)
- Ex-commands
- eval functions (ie. f_err_teapot())

On top of the existing algorithm,
scan diff hunks on C files to filter out N/A C functions.
If the remaining hunk contains applicable changes,
then the patch is applicable.
If the patch does not modify C files, then it is likely applicable.
2026-07-06 09:51:27 -04:00
Jan Edmund Lazo
3255e0546f build(vim-patch): mark 'tabpanel' files as N/A #40538
https://github.com/neovim/neovim/issues/34273 was not reopened.
Unsure if this feature warrants C code based on current codebase
and ecosystem. Nvim avoided CVE because it hasn't ported this feature
both "autocmd_add()".

N/A C functions outside these files will be marked N/A if
https://github.com/neovim/neovim/pull/40473 is merged.
2026-07-02 06:56:23 -04:00
Jan Edmund Lazo
bb6576c92a build(vim-patch): add N/A src/ files #40468
socketserver.c is not compatible with Neovim's server implementation.

cairo, kitty, sixel, and similar backends for image rendering in popup
are not required in Neovim's C core.
Neovim can do this and even run Doom.
See patch 9.2.0612.
2026-06-28 19:00:43 -04:00
Ryan Patterson
08b47b1964 test: wasm tree-sitter #40304
Problem:
No CI coverage for wasm builds.

Solution:
Add a basic workflow that builds with ENABLE_WASMTIME
and runs wasm-specific tests.
2026-06-19 05:51:30 -04:00
Justin M. Keyes
4c3b0ecb46 fix(cliff): strip "backport:" prefix from commit subject #40243
Problem:
Backport commits may have subjects like "backport: fix(ui): ...".
(e.g. ecda67662f). git-cliff treats them as OTHER.

Solution:
Preprocess the subject to strip a leading "backport:" or "backport ".
2026-06-14 12:00:37 -04:00
Jan Edmund Lazo
9708f9ddfb build(vim-patch): test_mswin_event() is N/A (#40158)
Relies on keycode/event handling specific to Windows instead of
"standard (test) API" for all OS.
2026-06-10 01:27:28 +00:00
Jan Edmund Lazo
91d6b046f7 build(vim-patch): N/A test files #40045
- keycode_check.json
- test_alot_latin.vim
- test_expand_dllpath.vim
2026-05-29 06:04:28 -04:00
Jan Edmund Lazo
b07e853f79 build(vim-patch): AGENTS.md is N/A #39490
Neovim did not port it from Vim.
Vim must design its AGENTS.md only for itself, ignoring Neovim,
for optimal AI behavior.
2026-04-29 07:07:30 -04:00
zeertzjq
c33e60f748 revert: "vim-patch:9.2.0405: when jumping to tags, will open URLs (#39461)" (#39487)
This reverts commit 72bc6c5801.

Fix #39480
2026-04-28 23:18:02 +00:00
Jan Edmund Lazo
689c824ef7 vim-patch:8.2.2128: there is no way to do something on CTRL-Z (#39440)
Problem:    There is no way to do something on CTRL-Z.
Solution:   Add VimSuspend and VimResume autocommand events. (closes vim/vim#7450)

100118c73a

----

Nvim implemented these events first and has enough tests.
test_suspend.vim relies on Vim 'terminal' feature.
Treat it as N/A even if all tests could be ported as Lua functional
screen/terminal tests.

----

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-04-27 03:57:01 +00:00
Jan Edmund Lazo
f8f95ee412 build(vim-patch): update N/A test files (#39405)
* build(vim-patch): test_clientserver.vim is N/A

Requires 'job' and 'clientserver' features.
Both N/A for Neovim.

* build(vim-patch): test_gui_init.vim is N/A

Starts with command 'CheckCanRuiGui' .
Nvim doesn't support ':gui' (yet).

* build(vim-patch): test_plugin_vimball.vim is N/A

Run ':h vimball'.

* build(vim-patch): test_remote.vim is N/A

Needs 'clientserver', 'terminal' features.

* build(vim-patch): test_short_sleep.py is for test_terminal.vim. Both N/A

* build(vim-patch): mark N/A files from test_crypt.vim

* build(vim-patch): mark N/A file for test_terminal3.vim

* build(vim-patch): mark N/A files channel/terminal/vim9 tests
2026-04-26 06:31:19 +08:00
bfredl
fe60268258 Merge pull request #39076 from bfredl/zig0.16
IT IS HAPPENING: Zig 0.16
2026-04-21 20:09:57 +02:00
zeertzjq
ac8459a09c fix(substitute): don't crash with very large count (#39272) 2026-04-21 11:38:15 +00:00
bfredl
52693e7af3 fix(build): more changes to make zig 0.16.0 work 2026-04-21 12:46:01 +02:00
Justin M. Keyes
a38451be40 fix(excmd): nlua_call_excmd require() failure is a "lua_error"
Although `nlua_call_excmd` is semantically for implementing Ex-commands,
the `require()` should never fail, so that's a "Lua error".

But if the call itself fails (the later `semsg` call), that's an "Ex
cmd" error.
2026-04-20 02:31:09 +02:00
Justin M. Keyes
3ebfa2a3cb feat(vimfn): use Lua for more excmds/vimfns
Problem:
Too much boilerplate needed to use Lua to impl an excmd or f_xx
function.

Solution:
- Add `nlua_call_vimfn` which takes the args typval, executes
  Lua, and returns a typval.
- refactor(excmd): lua impl for :log, :lsp
2026-04-18 16:57:37 +02:00
Justin M. Keyes
bc6d946cca test: lint EXX error codes #8155
Problem:
- Choosing a new EXX error code is tedious.
- It's possible to accidentally use an EXX error code for different
  purposes.

Solution:
Add a lint check which requires EXX error codes to have a :help tag.
This also avoids duplicates because `make doc` does `:helptags ++t doc`
which fails if duplicates are found.
2026-04-16 10:48:11 -04:00
Justin M. Keyes
11a1ec7df3 test: lint naming conventions #39117
Problem:
Naming conventions are not automatically checked.

Solution:
Add a check to the doc generator. Eventually we should extract this
somehow, but that will require refactoring the doc generator...

Note: this also checks non-public functions, basically anything that
passes through `gen_eval_files.lua` and `gen_vimdoc.lua`. And that's
a good thing.
2026-04-16 09:35:58 -04:00
Olivia Kinnear
87c3d519aa feat(build): rename io.neovim.nvim to org.neovim.nvim 2026-04-14 11:13:03 -05:00
Olivia Kinnear
5181b8952c fix(build): fix make appimage 2026-04-14 11:09:19 -05:00
Jan Edmund Lazo
56fe6713ca vim-patch:8.2.0904: assuming modifyOtherKeys for rhs of mapping (#38970)
Problem:    Assuming modifyOtherKeys for rhs of mapping.
Solution:   Ignore seenModifyOtherKeys for mapped characters. (closes vim/vim#6200)

46cd43bda1

----

"getchar.c" changes depend on patch 8.1.2145.
Can't port it due to tests.
"test_gui.vim" doesn't depend on GUI for all tests.

----

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-04-12 07:07:16 +08:00
Jan Edmund Lazo
828b91495c vim-patch:8.2.0898: missing help for a function goes unnoticed
Problem:    Missing help for a function goes unnoticed.
Solution:   Add a test. (Gary Johnson)

6b0e528368

----

Test relies on parsing runtime/doc/*.txt and src/evalfunc.c .
Error-prone because Vim and Nvim diverged on both documentation
and source code in spite of ported Vim patches.
Importing src/nvim/eval.lua is an alternative
but it uses associatve index such that it's unsorted.

Treat it as N/A because I can't rewrite any of its tests
under minimal effort.

----

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-04-11 02:05:03 -04:00
Jan Edmund Lazo
8367340b05 build(vim-patch): N/A runtime files (#38666)
* fix(vim-patch): runtime/doc/print.txt is N/A

- https://github.com/neovim/neovim/issues/21471

* fix(vim-patch): test_urls.vim is N/A

- https://github.com/neovim/neovim/pull/35593
2026-04-01 04:25:43 +00:00
Justin M. Keyes
844f2d2e13 ci(lintcommit): allow "NVIM vx.y.z" commit message #38563 2026-03-29 18:59:42 -04:00
Jan Edmund Lazo
83f0dd638c vim-patch:9.1.0327,9.2.0019 (#38567)
* vim-patch:9.2.0019: Hard to configure Vim according to full XDG spec

Problem:  Hard to configure Vim according to full XDG spec
Solution: Include the $VIMRUNTIME/xdg.vim script as an example.
          (Andrey Butirsky).

closes: vim/vim#19421

----

Nvim already supports XDG spec and provides 'stdpath()'.
runtime/xdg.vim is N/A.

----

4f04efb760

* vim-patch:9.1.0327: No support for using $XDG_CONFIG_HOME

Problem:  No support for using $XDG_CONFIG_HOME
Solution: optionally source $XDG_CONFIG_HOME/vim/vimrc
          (Luca Saccarola)

fixes: vim/vim#2034
closes: vim/vim#14182

---

test_xdg.vim can be applicable but it's a chore to swap "vimrc" with
"init.vim" and comment out gvimrc in all tests.
Nvim has enough XDG functional tests and runtime documentation.

Vim eventually rewrites the screendump tests such that
Nvim can run them in Unix-like systems.
It's possible to just port the latest version
and treat the older patches as N/A.

---

c9df1fb35a
2026-03-30 06:56:22 +08:00
Justin M. Keyes
d995142dbd fix(scripts): collect_typos.lua: show commit message on failure 2026-02-12 13:46:53 +01:00
Jan Edmund Lazo
d93e150888 fix(vim-patch): add N/A files and re-sort (#37544)
Nvim doesn't maintain runtime/macros/README.txt.
Nvim has existing linting rules for preprocesor.
2026-01-25 10:18:14 +08:00
Jan Edmund Lazo
4cce77e547 vim-patch:9.1.1984: terminal OSC52 support can be improved (#37543)
Problem:  terminal OSC52 support to access the clipboard can be improved
Solution: Include and package the optional osc52 package, note: this
          requires a Vim with clipboard provider feature (Foxe Chen).

related: vim/vim#14995
closes: vim/vim#18575

02b8ec7da5

----

Nvim has incompatible implementation for OSC52 clipboard provider.
Vim9 is N/A.

Co-authored-by: Foxe Chen <chen.foxe@gmail.com>
2026-01-25 08:17:33 +08:00
Jan Edmund Lazo
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

322ba91086

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-15 13:35:21 +08: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
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
Jan Edmund Lazo
8bd942e820 build(vim-patch): getscript plugin is N/A (#37247)
- https://github.com/neovim/neovim/issues/2231#issuecomment-89873348
- https://github.com/neovim/neovim/pull/3826
2026-01-05 13:33:57 +08:00
Jan Edmund Lazo
d548b52b0f build(vim-patch): update Vim N/A file/regexp (#37049)
* fix(vim-patch): test_codestyle.vim is NA

Neovim has make lint, specifically clint.lua.
Unless vim9jit, https://github.com/tjdevries/vim9jit, or similar tool
compiles vim9 "test" code into lua, it's futile to port it.

* fix(vim-patch): NA files from dev_vimpatch.txt

- channel
- json
- job
- term
- terminal

Nvim has its own incompatible implementation or uses 3rd-party
libraries (ie. libuv, libtermkey).

* fix(vim-patch): term.c is applicable for replace_termcodes()

* fix(vim-patch/na): blowfish,dlldata,iid_ole,nbdebug,os_w32

blowfish is for encryption.
dlldata,iid_ole,os_w32 are for Windows (GUI, registry, entry point).
Nvim doesn't need them to be installed on Windows.

nbdebug.[ch] is for Netbeans Debugging Tools.
They're N/A.

* fix(vim-patch): runtime/

Nvim has its own documentation for development

- runtime/doc/debug.txt
- runtime/doc/develop.txt

N/A since the beginning:

- runtime/doc/os_haiku.txt
- runtime/doc/pi_logipat.txt
- runtime/doc/quotes.txt
- runtime/plugin/logiPat.vim
- runtime/plugin/manpager.vim
- runtime/tools/demoserver.py
- runtime/spell/.*\.latin1

Vim9 is N/A.

- runtime/doc/os_haiku.txt

* fix(vim-patch): src/

win32yank replaces "src/winclip.c".
Vim's desktop files are N/A.
Nvim removed 'termencoding'.
Nvim doesn't use Vim's lsan-suppress.txt to configures LSAN.
2026-01-04 14:15:23 +08:00
Jan Edmund Lazo
5196162540 feat(version): support multiple Vim versions
Group up to 15 vimpatch numbers in 1 line to guard against
'make formatc'.
1-liner for vim_versions, num_patches.

Automate '*Version' to remove version.h macros.

'-V1 -v' lists merged Vim versions.
2025-12-01 02:34:51 -05:00
Jan Edmund Lazo
361671870e feat(vim-patch.sh): -M lists all ported patches
Start from current "v:version".
Exclude reverted patches.
Normalize left-zero-pad patch numbers to avoid grep inverse pattern
file like scripts/vim_na_regexp.txt.
Track reverted patches in vimpatch_token_reverts.txt
because no convention in git-log.

TODO: Track patch numbers per v:version in version.c.
2025-12-01 02:34:51 -05:00
Justin M. Keyes
d62bbe24cb fix(tui): enable vtpcon strikethrough feature #36762
Problem:
Strikethrough was not enabled for vtpcon thus preventing strikethrough
text from being shown.

Solution:
Update `windows.ti`.

Co-authored-by: ymich9963 <gmichael834@gmail.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-11-30 11:22:12 -05:00
Siwen Yu
4daa8eb5ab fix(appimage): wrong $ARCH used by linuxdeploy #36712
Problem:
In scripts/genappimage.sh running on arm64 host, the $ARCH will be set to
'arm64' before calling linuxdeploy, which cause linuxdeploy to generate
an 32bit ELF executable instead 64bit. See the issue for more details.

Solution:
Keep $ARCH unchanged, use $ARCH_OUTPUT in the output file name. On arm64
host, $ARCH_OUTPUT will be converted to 'arm64'.
2025-11-27 09:33:12 -08:00
Justin M. Keyes
b7a670a6d2 docs: decode MIME-encoded author name 2025-11-23 20:03:12 -05:00
Yochem van Rosmalen
a468bc573d ci: check URL reachability #35593
Problem:
scripts/check_urls.vim manually matches urls in the help pages and then
synchronously checks them via curl/wget/powershell. This is extremely
slow (~5 minutes for Nvims runtime on my machine) and prone to errors in
how the urls are matched.

Solution:
- Use Tree-sitter to find the urls in the help pages and `vim.net.request` to
  check the responses.
- Add a `lintdocurls` build task and check it in CI (every Friday).
  - Reopens a dedicated issue if it finds unreachable URLs.
- Drop the old check_urls.vim script.
2025-11-18 12:35:22 -08:00
Jan Edmund Lazo
d2517acdc5 fix(vim-patch.sh): 'vim-patch:<hash>' token for 'non-patch' commits #36534
Vim may tag runtime-only commits without the 2-liner version.c change.
Inspect both tag and commit message to "guess" if it the patch
should go to version.c or not.
2025-11-12 20:46:22 -08:00
zeertzjq
8bce9342d1 fix(vim-patch.sh): don't treat 1-file runtime-only patch as N/A (#36525)
If the patch in question does not change src/version.c, `git log -1`
instead shows the previous patch that changes src/version.c, which
causes 1-file runtime-only patches to be considered N/A.

Check that the remaining file is src/version.c to fix this problem.
Also use `git diff-tree` instead of `git log -1` for version.c.
2025-11-12 14:45:20 +08:00
Jan Edmund Lazo
7fe02126f9 feat(vim-patch.sh): add n flag to list possible N/A patches (#36431)
Scan all unmerged Vim commits to determine which commits are N/A
for Neovim.
vim_na_regexp.txt contains the file patterns to filter out N/A files
in a Vim commit.
vim_na_files.txt contains "absolute filepath" of N/A files.
It relies on vim_na_regexp.txt to reduce file size.
If version.c remains and it has the expected 2-liner update,
then it's considered N/A.

https://github.com/neovim/neovim/discussions/36326
2025-11-11 03:09:44 +00:00
Justin M. Keyes
130ef73e39 fix(scripts): release.sh 2025-11-02 11:57:56 -05:00
Justin M. Keyes
6dd6c5b523 docs: rename l10n help files #36377 2025-10-28 20:15:16 -07:00