Commit Graph

37499 Commits

Author SHA1 Message Date
marvim
29e535a6ad docs: update version.c
vim-patch:8.2.1855: Vim9: get error message when nothing is wrong
vim-patch:9.0.2084: Vim9: abstract static methods are possible
vim-patch:9.1.1094: Vim9: problem finding implemented method in type hierarchy
2026-08-01 04:15:20 +00:00
zeertzjq
7b28b1f4a9 Merge pull request #41085 from zeertzjq/vim-9.2.0883
vim-patch:9.2.{0883,0884,0885,0887}
2026-08-01 09:36:56 +08:00
zeertzjq
86bbe41459 vim-patch:9.2.0885: scroll: 'smoothscroll' position is lost when the window is squeezed
Problem:  With 'smoothscroll' the scroll position in a long line is lost when
          a window is temporarily squeezed to a couple of lines, for example
          when opening and closing a help window.
Solution: When the cursor ends up in the skipped columns, skip up to the
          screen line the cursor is in instead of showing the start of the
          line.

closes: vim/vim#20892

15f8ba5cec

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 08:30:39 +08:00
zeertzjq
b08c588238 vim-patch:9.2.0884: scroll: unreachable 'smoothscroll' code in cursor_correct()
Problem:  cursor_correct() checks for 'smoothscroll' with 'wrap' off, a
          combination where 'smoothscroll' has no effect.
Solution: Remove the check, adjust_skipcol() already handles the case where
          the cursor line just fits in the window.

closes: vim/vim#20891

2ea497f072

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 08:28:56 +08:00
zeertzjq
d9525e23f3 vim-patch:9.2.0883: scroll: 'smoothscroll' position is lost when using "|"
Problem:  With 'smoothscroll' the scroll position in a long line is lost when
          moving to a column with "|".
Solution: Adjust the skipped columns for the column the cursor ends up in,
          not for column zero.

related: vim/vim#20885
closes:  vim/vim#20890

5ed8fc10fa

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 08:27:52 +08:00
zeertzjq
f129b5428a vim-patch:e31fb9b: runtime(lf): update syntax to support lf version r42 (#41083)
closes: vim/vim#20897

e31fb9bb67

Co-authored-by: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com>
2026-08-01 08:25:29 +08:00
zeertzjq
f8872bccbe vim-patch:9.2.0882: :bwipe crashes if WinLeave wipes all other buffers (#41082)
Problem:  :bwipe crashes if WinLeave wipes all other buffers
          (after 9.1.2068).
Solution: Check for NULL pointer.

related: neovim/neovim#41066
closes: vim/vim#20888

3e4019a082
2026-07-31 23:25:28 +00:00
Justin M. Keyes
4836ecad1f Merge #41065 from justinmk/optionfunc
feat(options): Lua closure/function options
2026-07-31 18:01:51 -04:00
Justin M. Keyes
102e806320 refactor(options): simplify "unset" logic 2026-07-31 21:50:04 +02:00
Justin M. Keyes
3e01dcddbe refactor(options): memory management
Problem:
Numerous callers have to manually check optval ownership (i.e. whether,
and how, to release) via `is_callback_option`, `option_is_global_local`,
etc. This is fragile, hard to use correctly; and if we introduce another
optval variant in the future, we'll have to redo all of these careful
checks and boilerplate again.

Solution:
Provide a unified system and use it everywhere:

    optval_free_owned
    optval_is_owned
    optval_own
2026-07-31 21:50:04 +02:00
Justin M. Keyes
726d1a92d2 feat(options): lua closure/function options
Problem:
Cannot assign Lua functions/closures to "func" ('completefunc',
'tagfun', …) or "expr" ('foldexpr', 'indentexpr', …) options.

Solution:
- Store "func"/"expr" options as `Callback` instead of string.
- Delete oceans of copy-pasted code.
- BREAKING: LuaRef returned via RPC/Vimscript is now represented as
  `"<Lua N: file:line>"` (like what `:map` shows) instead of `nil`.
- Note: `man.vim` still uses `v:lua` string, bc it's a vimscript ftplugin.

Helped-by: Lewis Russell <lewis6991@gmail.com>
2026-07-31 21:50:04 +02:00
Justin M. Keyes
917232b508 Merge #40953 from barrettruth/feat/zip-extract
feat(zip): extract archive entries
2026-07-31 15:45:14 -04:00
Jan Edmund Lazo
02a25caa1b build(vim-patch): N/A diffs from vim9 err msgs #41070 2026-07-31 05:09:43 -04:00
github-actions[bot]
25d5fe34a8 docs: update version.c #41041
vim-patch:decab25ac runtime(doc): Vim9: dictionary in a lambda block is not documented
vim-patch:f594f41e7 runtime(doc): regenerate help tags
vim-patch:61997d8ce translation(it): Update Italian man page
vim-patch:9.2.0876: GTK4: compile error with disabled netbeans feat
vim-patch:9.2.0877: Vim9: crash when a closure assigns to a variable declared in a loop
vim-patch:9.2.0878: Vim9: cannot use a script variable of an enclosing block in a lambda
vim-patch:9.2.0879: popup: "maxwidth" is not respected when 'wrap' is off
vim-patch:902db1d7a runtime(doc): update todo for the remaining 'smoothscroll' scroll position

vim-patch:9.1.0045: --remote-* does not ignore wilidignore
2026-07-31 05:00:21 -04:00
zeertzjq
a35c604718 Merge pull request #41071 from zeertzjq/vim-9.2.0880
vim-patch:9.2.{0880,0881}
nightly
2026-07-31 12:23:28 +08:00
zeertzjq
f7cc79edf4 vim-patch:9.2.0881: 'smoothscroll' position is lost when the window height changes
Problem:  With 'smoothscroll' the scroll position of a window is lost when
          its height changes.
Solution: Only reset the skipped columns when 'smoothscroll' is off, where
          they just serve to keep the cursor visible.

closes: vim/vim#20885

17f3923b8c

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 11:22:27 +08:00
zeertzjq
f9040dbe03 vim-patch:9.2.0880: scroll: window scrolls when using the autocommand window
Problem:  The window scrolls when an autocommand window is used while the
          cursor is behind multi-byte characters.
Solution: Use the byte column instead of the character count when computing
          how many screen lines the text up to the cursor takes.

fixes:  vim/vim#12085
closes: vim/vim#20884

7fe3ea7658

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 11:22:26 +08:00
zeertzjq
9d7c004ade Merge pull request #41069 from zeertzjq/vim-b0e0b22
vim-patch: runtime file updates
2026-07-31 10:48:46 +08:00
zeertzjq
41378d4610 vim-patch:e241ac0: runtime(zip): fix failure on Windows CI
Problem:  The zip autoload script aborts loading when the "zip"
          command is not available, so even read-only browsing of an
          archive fails with E117 (zip#Browse undefined) on systems
          that have "unzip" but not "zip" (e.g. the Windows CI
          runner).  Regressed in b0e0b22.
Solution: Drop the load-time executable gate and check each command
          per operation instead, so a missing "zip" only affects
          writing.  Update the test to match the reworded message.

e241ac0a62

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-31 09:32:40 +08:00
zeertzjq
659259d736 vim-patch:99921ff: runtime(marko): improve syntax highlighting
closes: vim/vim#20874

99921ffc39

Co-authored-by: Brian Carbone <brian@briancarbone.com>
2026-07-31 09:28:56 +08:00
zeertzjq
0e3e15d161 vim-patch:b0e0b22: runtime(zip): Improve Compatibility for powershell 5 and pwsh 7
related: vim/vim#20832

b0e0b22535

Co-authored-by: curbe454 <asu454@outlook.com>
Co-Authored-By: curbe454 <asu454@outlook.com>
2026-07-31 09:28:28 +08:00
Justin M. Keyes
6cdab150bc docs: misc #41063 2026-07-30 15:09:19 -04:00
Justin M. Keyes
a7f422fa48 refactor(options): naming #41046
- "obj" refers to structured (non-scalar `Object`) option values.
- "optval" generally refers to the internal scalar (legacy ":set"-style)
  option value.
2026-07-30 09:50:26 -04:00
dependabot[bot]
a61ded9b56 ci: bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [github/codeql-action](https://github.com/github/codeql-action) and [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action).


Updates `github/codeql-action` from 4.37.1 to 4.37.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.37.1...v4.37.3)

Updates `zizmorcore/zizmor-action` from 0.6.0 to 0.6.1
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](6599ee8b7a...6fc4b00623)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.37.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.6.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-30 15:06:56 +02:00
Barrett Ruth
c1a65ff353 docs(tui): kitty keyboard protocol flags #41056
Nvim has sent CSI > 3 u since 4fb3b57a19, but tui.txt still documented
CSI > 1 u.
2026-07-30 05:50:39 -04:00
Justin M. Keyes
b5c623112e Merge #41057 from janlazo/vim-na-c-plus-docs 2026-07-30 05:48:42 -04:00
Kyle
a3eff66e31 fix(tui): xterm default cursor style #41050
Problem:
xterm doesn't reset to user configured default with the sequence `\x1b[0 q`.

Solution:
Restore old behavior: if the reset cursor style terminfo entry is
absent, xterm's sequence should set the cursor to steady block, which is
the xterm default. In the near future, they may support another option
(`\x1b[7 q`) to reset to the user configured default.
2026-07-30 03:34:26 -04:00
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
zeertzjq
a85cce90e3 vim-patch:partial:b4ae16c: runtime(doc): clarify 'laststatus' effect (#41052)
fixes: vim/vim#20875

b4ae16ca3e

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-30 00:11:46 +00:00
zeertzjq
d93684023f vim-patch:9.2.0871: screen line is lost when splitting a 'winfixheight' window (#41054)
Problem:  When the only window has 'winfixheight' set and 'laststatus'
          is one, splitting it leaves one screen line unused.  This
          happens for example when jumping to an item from a maximized
          quickfix window (rendcrx)
Solution: Do not subtract the height of the status line twice
          (Hirohito Higashi)

fixes:  vim/vim#20495
closes: vim/vim#20871

ab36bcc870

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 23:12:10 +00:00
zeertzjq
943df84fb6 vim-patch:f26970c: runtime(karel): improve indent plugin (#41053)
closes: vim/vim#20873

f26970ce56

Co-authored-by: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
2026-07-29 22:59:15 +00:00
zeertzjq
9a4b38584c vim-patch:9.2.0874: fold size is compared against 'foldminlines' of the wrong window (#41051)
Problem:  checkSmall() compares the fold size of window "wp" against
          the current window's 'foldminlines'.  A fold of another
          window, e.g. measured while it is redrawn, is judged by an
          unrelated option value.
Solution: Use 'foldminlines' of the window containing the fold
          (Igor Mikushkin).

closes: vim/vim#20864

773dc19f14

Co-authored-by: Igor Mikushkin <igor.mikushkin@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-07-29 22:19:12 +00:00
Barrett Ruth
3fdb74748a fix: review 2026-07-29 14:56:26 -05:00
Barrett Ruth
1bba96f259 fix(test): group zip tests and drop repeated setup 2026-07-29 14:32:37 -05:00
Barrett Ruth
1ffbd3598a test(zip): cover difficult member names 2026-07-29 14:32:37 -05:00
Barrett Ruth
36204b4323 feat(zip): extract archive members 2026-07-29 14:32:37 -05:00
Barrett Ruth
f82cf8fd59 fix(zip): list a valid empty archive as empty 2026-07-29 14:32:36 -05:00
Barrett Ruth
e63cf57106 fix(zip): keep a leading dash from becoming a backend option 2026-07-29 14:32:36 -05:00
Barrett Ruth
e29af9c32f refactor(zip)!: builtin zip.lua plugin #40846
Problem:
The bundled `zip` plugin is implemented in Vimscript, making it harder to
maintain and build on with Nvim's Lua runtime infrastructure.

Solution:
Add an opt-out `zip.lua` browser backed by `nvim.dir`, and disable the legacy
Vimscript implementation by moving it to `pack/dist/opt/zip/`. Load it with
`:packadd zip`.
2026-07-29 12:54:43 -04:00
Nathan Zeng
1dbc766fa7 fix(ui2): clear empty cmdline after backspace #41043
Problem:
Cmdline area shows stale ":" after backspacing out of the command line.

Solution:
Clear the command line for empty commands. Note that `:<CR>` will now
clear the command line too.
2026-07-29 12:40:08 -04:00
Justin M. Keyes
b9d732c249 Merge #41045 from justinmk/refactoroptions 2026-07-29 09:57:19 -04:00
Justin M. Keyes
1a755e4890 fix(options): latent codegen bug
Problem:
Latent bug from 7f6c14ed54 (2015).
If an option default is "false" (`o.defaults.if_false = false`, e.g.
'fileignorecase'), codegen does not give it a `.def_val` on the platform
where its `#if` condition is undefined; it is zero-initialized.

This wasn't noticed until the parent commit, where zero value is
kObjectTypeNil, which `set_option_varp()` rejects.

Solution:
Check `if_false == nil` insteada of "falsey", so the `#else` branch gets
generated.
2026-07-29 15:27:45 +02:00
Justin M. Keyes
cb7c019167 refactor(options): drop OptVal, use Object
Problem:
The object subsystem has an intermediate representation for no real
reason. Besides the code cost, this also adds an extra (api <=> OptVal)
conversion step, which is a (small) perf cost.

Solution:
We already have `Object`, so use it instead.

- drop `OptVal`, `OptValData`, `OptValType`, and related boilerplate.
- add `kObjectTypeUnset`.
2026-07-29 15:27:45 +02:00
flatplum
7b34bca2a6 docs(health): avoid warnings for dynamic filetypes #41036
Problem:
Dynamic filetypes defined by `vim.filetype.add` may show health warnings.

Solution:
Document a way to suppress these harmless warnings.
2026-07-29 09:03:53 -04:00
glepnir
182b02afb0 fix(insexpand): use String cleanup for compl_leader (#41044)
Problem:
compl_leader is a String, but it is cleared with XFREE_CLEAR().

Solution:
Replace XFREE_CLEAR() with API_CLEAR_STRING().
2026-07-29 10:51:44 +00:00
zeertzjq
7b7a21bd2a vim-patch:9.2.0869: buf_copy_options() can lose the P_INSECURE flag (#41040)
Problem:  An insecurely-set 'indentexpr', 'formatexpr', 'includeexpr'
          or 'complete' value can end up evaluated outside the
          sandbox after buf_copy_options() and clears the flag.
Solution: Copy the insecure flag alongside the value in
          buf_copy_options(), and make 'complete' a per-buffer
          insecure-flags field

Supported by AI.

closes: vim/vim#20861

35f7fdfdfb

I'm a bit hesitant to port this, but it's a follow-up to #39452.

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-29 17:44:51 +08:00
zeertzjq
1eba3a75da vim-patch:9.2.0870: filetype: marko files are not recognized (#41038)
Problem:  filetype: marko files are not recognized
Solution: Detect *.marko files as marko filetype, include a syntax
          plugin and add syntax tests (Brian Carbone)

References:
https://markojs.com
https://github.com/marko-js/tree-sitter
https://github.com/marko-js/language-server
https://v5.markojs.com/docs/editor-plugins/

closes: vim/vim#20863

95da62a910

Co-authored-by: Brian Carbone <brian@briancarbone.com>
2026-07-29 09:14:48 +08:00
zeertzjq
a8626466e8 vim-patch:70d55cd: runtime(m4): Prevent the m4Disabled region from nesting within itself. (#41037)
closes: vim/vim#20801

70d55cd516

Co-authored-by: Sam Williams <sam@badcow.co>
2026-07-29 09:14:14 +08:00
Barrett Ruth
635acc7dc8 fix(terminal): cursor moves on resize when line above is full width #40996 2026-07-28 14:59:18 -04:00