Commit Graph

1005 Commits

Author SHA1 Message Date
Jan Edmund Lazo
a3b85b9a4d build(vim-patch): ':vim9' is n/a
1. Vim9 error messages, ex commands, are N/A.
2. ":scriptversion" is N/A:
3. Most `#.*define.*ex_ni$` are N/A
   because `FEAT_` compile guards are N/A.

----

Target patch: v8.2.2238

Actual patch list:

```
vim-patch:8.2.4240: error for using flatten() in Vim9 script is unclear
vim-patch:9.0.0170: various minor code formatting issues
vim-patch:9.1.0356: MS-Windows: --remote may change working directory
vim-patch:9.2.0251: Link error when building without channel feature
vim-patch:9.2.0714: Coverity warns for NULL deref
vim-patch:9.2.0818: tests: client-server test fails without X11 server
vim-patch:9.2.0868: GTK: Window Manager hint prevents giving focus to dialog
```

----

Ignore diff blanklines via regex ("-I"), not "--ignore-blank-lines".
Almost useless.
I tried with/without "--word-diff=porcelain", "--word-diff-regex",
and diff algorithms like `--histogram`.
2026-07-30 01:21:07 -04:00
Jan Edmund Lazo
85b1df6ec1 build(vim-patch): clientserver feature is N/A
Shared API, documented in remote.txt, is surface-level.
Assume 0% compatiblity from Vim.
2026-07-29 23:22:31 -04:00
Jan Edmund Lazo
72e3fc2074 build(vim-patch): ":version" doc is n/a #41018
Nvim diverged from Vim's ":version".

- no date
- different compiled features list
- different config file and directory
- no compiler flags

* build(vim-patch): n/a doc for balloon feature (8.2.3917)
2026-07-28 06:10:36 -04:00
Jan Edmund Lazo
931a6d2c14 build(vim-patch): ":h builtin-function-list" is n/a 2026-07-27 01:57:18 -04:00
Jan Edmund Lazo
649bf7bcf2 build(vim-patch): helptoc is 100% n/a
Use "gO" mapping instead.
vim9script is N/A.

Detect 'runtime/doc/helphelp.txt' N/A patches for helptoc.
2026-07-27 01:21:24 -04:00
Jan Edmund Lazo
6dc755ee09 build(vim-patch): skip doc for n/a features
Fix xfuncname to support tags that target Vim mappings, options.

- events
- options
    - *'luadll'*
    - *'mzschemedll'*
    - *'mzschemegcdll'*
    - *'perldll'*
    - *'pythondll'*
    - *'pythonthreedll'*
    - *'rubydll'*
    - *'tcldll'*
    - *'winptydll'*
    - t_.+, termcap opts
- internal variables
- cli flags
- ':h emacs-tags'
2026-07-27 01:20:35 -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
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
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
9604c758b3 perf(options): no-alloc keysets 2026-07-24 13:05:20 +02:00
Justin M. Keyes
f8cfd7f06a feat(options): schema, "dict" options, messages
Problem:
Options parsing is still painful for dict-style options.

Solution:
schema-maxxing => better `opt:get()` (will be the basis for `vim.o()`),
unified (and more-detailed) err msgs.

- Drop bespoke structure-builder in `_core/options.lua`.
- Define `schema` for all non-primitive options (except 'guicursor' and
  statusline-style options); generate reified keysets `OptKeyDict`).
  - Generate 'fillchars' => `fcs_tab`, 'listchars' => `lcs_tab`.
- `nvim_set_option_value`:
  - Return the improved structures. Also from `vim.opt.x:get()`.
  - Eliminate api <=> lua roundtrip, centralize option structure
    handling.
- Improve/unify errors.
  - Bump ERR_BUFLEN 80 → 256 so the "one of" list isn't truncated.
- Eliminate old 'diffopt' order-dependence (`iwhiteall` before `iwhite`)

Error samples:

    Typed-key path (opt_strings_check → diffopt/mousescroll/breakindentopt):
    E474: Unknown item 'foo'
    E474: 'context' requires a number
    E474: 'ver' number is out of range
    E474: 'algorithm' must be one of: myers, minimal, patience, histogram
    E474: 'filler' does not take a value

Related:

- #31084
- #34661
- #31820
- #14739
- #20107
- fix #18875
  - :get() returns `{ sbr = true, shift = '3' }` (reified-keyset) instead of `{'sbr', 'shift:3'}`
  - Setting via table now works too. `object_as_optval_for` `is_map` now recognizes struct options.
- fix #30296
  - instead of `E474: Invalid argument`, errors now look like:
    ```
    E474: Invalid value 'x', expected one of: single, double: ambiwidth=x
    E474: Unknown item 'foo': diffopt=foo
    E474: 'context' requires a number: diffopt=context:x
    ```

simplify `win_float_parse_option` from #26799.
2026-07-24 13:05:20 +02:00
Jan Edmund Lazo
cabfa17480 build(vim-patch): logfile.c is N/A
Vim channel API logging is N/A.
2026-07-23 08:56:22 -04:00
Jan Edmund Lazo
8edbf9dac0 build(vim-patch): n/a doc for channel,job api
Vim's code and test for channel,job API are already N/A.
Blacklisting runtime/doc/channel.txt ensures most patches for it
will be detected as N/A.
Vim's API that is too incompatible with Neovim must be handled
outside vim-patch.sh .
2026-07-23 08:56:22 -04:00
Jan Edmund Lazo
800e12ac8a build(vim-patch): n/a runtime/doc/*.txt updates
- Vim version header (date)
- N/A Vimscript functions
    - "listener_" and "redraw_listener_" API
- N/A line changes
    - "^.*{.* compiled with .*}$"
2026-07-23 08:56:22 -04:00
Barrett Ruth
1dffa35d46 build(deps): bundle tree-sitter-diff parser #40778 2026-07-19 19:55:20 -04:00
Jan Edmund Lazo
d2a3e0e881 vim-patch:8.2.2271: ml_get error when changing hidden buffer in Python (#40833)
Problem:    ml_get error when changing hidden buffer in Python.
Solution:   Block updating folds. (closes vim/vim#7598)

----

"ctx_switch()", "ctx_restore()" obsolete "switch_buffer()" and
"restore_buffer()".
Latter are unused since https://github.com/neovim/neovim/pull/15831.
Mark them as N/A (until some test fails).

----

3e0107ea16

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-07-19 19:51:47 -04:00
Jan Edmund Lazo
ad3720b882 vim-patch:8.2.1968: Vim9: has() assumes a feature does not change dynamically (#40827)
Problem:    Vim9: has() assumes a feature does not change dynamically.
Solution:   Check whether a feature may change dynamically. (closes vim/vim#7265)

----

"dynamic_feature()" is only for vim9script which is N/A.

----

8cebd43e97

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-07-19 02:33:25 +00:00
Jan Edmund Lazo
9536d35099 build(vim-patch): ignore amount of whitespace change
Patch 9.1.1363 is N/A after ignoring whitespace.

-----

Unrelated N/A patches
vim-patch:8.1.1985: code for dealing with paths is spread out

https://github.com/neovim/neovim/pull/36125#issuecomment-5012670153
2026-07-18 16:09:17 -04:00
Jan Edmund Lazo
277cb1b431 build(vim-patch): "vim_" char/string N/A funcs
Note this doesn't find new N/A patches by itself
and this is to align with ':h dev-vimpatch'.

Neovim refactored Vim's "char/string" functions to be either safer
(ie. xstrlcat) or target Unicode.
2026-07-18 15:10:03 -04:00
Jan Edmund Lazo
a99f8989f7 build(vim-patch): alloc.c N/A functions
Note this doesn't find new N/A patches by itself
and this is to align with ':h dev-vimpatch'.
I use the 'vim_na_*' files to debug the filtered diff of files
that seem N/A but contain relevant code.
I can't blacklist the entire file.
2026-07-18 14:49:33 -04:00
Jan Edmund Lazo
0d92bf3761 build(vim-patch): '#ifdef FEAT_' tweaking is N/A #40785
Filter out `#ifdef` line changes when analyzing C files (*.c, *.h)
via git "-I" flag.

```
-I<regex>
--ignore-matching-lines=<regex>
Ignore changes whose all lines match <regex>. This option may be specified more than once.
```

- https://git-scm.com/docs/diff-options#Documentation/diff-options.txt--Iregex
2026-07-17 07:16:31 -04:00
Jan Edmund Lazo
02290ba155 build(vim-patch): detect patch v8.2.0000 as N/A
Following features must be N/A to detect v8.Y.0000 as N/A

- VisVim
- Windows *.def files
- Gvim
- runtime/doc/version8.txt ("too old")
  (https://github.com/neovim/neovim/pull/1116 deletes version7.txt)
2026-07-14 01:34:44 -04:00
Jan Edmund Lazo
2e9b06caf7 build(vim-patch): N/A runtime/doc/*.txt changes
Vim's runtime/doc/*.txt may change the 1st line only
for publish datetime.
Nvim removed those datetimes.

TODO - src/version.h for vX.Y.0000 patch.
2026-07-14 01:03:57 -04:00
Jan Edmund Lazo
60cbdc7996 build(vim-patch): src/version.h is N/A #40730
PR https://github.com/neovim/neovim/pull/36585 enabled
"scripts/vim-patch.sh", "scripts/vimpatch.lua" to optimize out
(all?) macros from Vim's "src/version.h".
If it does have relevant updates, then the applicable files
(ie. src/version.c) will use them to make the patch applicable.

Goal - Detect N/A patches for Vim release vX.Y.0000.
2026-07-13 21:26:08 -04:00
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