Commit Graph

36751 Commits

Author SHA1 Message Date
zeertzjq
31a8bf1a63 vim-patch:de18ef6: runtime(doc): Tweak documentation style (#40093)
closes: vim/vim#20412

de18ef6284

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-06-02 18:55:44 +00:00
zeertzjq
5a8e4cc5fa vim-patch:9.2.0581: After maximizing and deleting the quickfix buffer, window height is wrong (#40092)
Problem:  After maximizing and deleting the quickfix buffer, window
          height is wrong (tertium)
Solution: Reset the winfixheight option when a quickfix buffer is
          deleted from a window (Yegappan Lakshmanan)

fixes:  vim/vim#3378
closes: vim/vim#20403

07f055f579

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2026-06-02 18:30:20 +00:00
zeertzjq
75ee4272a6 vim-patch:7895c9e: runtime(vim): Update ftplugin, add heredocs to b:match_words (#40091)
This depends on chrisbra/matchit#61 for full support of non-alphnum
heredoc markers.

closes: vim/vim#20399

7895c9e6b8

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-06-02 16:55:20 +00:00
Kevin
d0c7f870c2 refactor(docs): extract HTML-specific bits from gen_help_html #39946
Problem:
We'd like to export a PDF version of the user manual
(https://github.com/neovim/neovim.github.io/issues/477), but
`gen_help_html.lua` assumes an HTML output in several places.

Solution:
- Make gen() take an output param
- Rename gen_one() -> gen_one_html()
- Rename visit_node() -> ts_node_to_html()
- Add a mapping to gen() that calls the correct gen_one*() function.

This prepares the addition of new methods for Typst output.
2026-06-02 10:28:01 -04:00
Justin M. Keyes
7f233449f1 Merge #40083 from ofseed/pos-get-lines-improve
fix(pos): various improvements on `pos._util.get_lines()`
2026-06-02 09:56:49 -04:00
Justin M. Keyes
70f8c7bbf3 Merge #40057 from luukvbaal/hidenodraw
perf(redraw): don't redraw hidden windows
2026-06-02 08:51:08 -04:00
Yi Ming
a7408beae3 refactor(net): parameterize transport logging #40022 2026-06-02 08:41:36 -04:00
zeertzjq
dcf36e613b vim-patch:e9f8e0f: runtime(matchit): Update matchit plugin (#40085)
e9f8e0fcbe

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-06-02 12:17:33 +00:00
bfredl
772cfcf267 Merge pull request #39074 from bfredl/retromania
build(zig): run oldtests in zig builds (RETROMANIA HYPERDRIVE)
2026-06-02 12:34:40 +02:00
Yi Ming
241a725e17 fix(pos): get_lines() return empty table when file opening fails
Problem:
`get_lines()` may returns empty table when file opening fails,
so every existing caller use `get_line() or ''` to avoid nil result.

This also does not match the annotated return type of `get_line()`,
which is `string` instead of `string?`.

Solution:
Make `get_line()` return empty string when file opening fails.
2026-06-02 18:17:03 +08:00
Yi Ming
5beb751ef5 fix(pos): get_lines() never correctly fallbacks to empty string
Problem:
`nvim_buf_get_lines` will always returns a table,
so the `or` operator will never be used, letting `lines[row]` may be `nil`

Solution:
Fix it.
2026-06-02 18:15:48 +08:00
Yi Ming
d369979328 refactor(pos): remove unnecessary code of get_lines(), tidy up
Problem:
`get_lines()` actually supports passing a `integer` instead of `integer[]`,
but it is never used in this way, we use `get_line()` instead.

Solution:
Fix it. Also rename some variables to align with our current naming convention
and use `vim.fn.readblob()` instead  of a bunch of `uv` calls.
2026-06-02 18:15:44 +08:00
bfredl
49dc3d9424 build(zig): run oldtests in zig builds with new lua runner
The new lua based runner replaces Makefile, runnvim.sh and runnvim.vim

As it happens, we run a `--headless` nvim inside a `:terminal` layer,
this is pointless.
Also there is still a lot remnants for oldesttests, but we don't
have any except for test1.in which just checks the environment
for following, nonexistant oldesttests. so just skip that.

For now, the actual vimscript code which runs in vim-under-test is
completely unchanged.

On macos, luajit is finally working with the latest ziglua master.
Also fix some minor bugs regarding locales, such as incorrect
HAVE_WORKING_LIBINTL checks
2026-06-02 11:12:11 +02:00
zeertzjq
c18373d9b8 Merge pull request #40082 from zeertzjq/vim-bcb8dac
vim-patch: syntax file updates
2026-06-02 16:45:57 +08:00
zeertzjq
c1253d6f95 vim-patch:fd30a73: runtime(cpp): recognize C++23 stdfloat types
Add float16_t, float32_t, float64_t, float128_t and bfloat16_t from
<stdfloat> as cppType under a new cpp_no_cpp23 guard.

fixes:  vim/vim#16498
closes: vim/vim#20367

fd30a736cc

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-06-02 07:39:05 +02:00
zeertzjq
6ca94cb8fb vim-patch:77b2376: runtime(c): classify type qualifiers, function specifiers and C23 attributes
Move const, volatile, restrict and _Atomic to a new cTypeQualifier group
and inline and _Noreturn to cFunctionSpec. Add the C23 standard attributes
deprecated, fallthrough, maybe_unused, nodiscard, unsequenced and
reproducible as cStandardAttribute, and reclassify the existing noreturn
into the same group.

The new groups link to cStorageClass, so the default highlighting and any
existing cStorageClass override are unchanged, while allowing finer-grained
customization.

fixes:  vim/vim#19574
closes: vim/vim#20368

77b2376769

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-06-02 07:38:07 +02:00
zeertzjq
1547089390 vim-patch:bcb8dac: runtime(sgf): Include sgf syntax script
closes: vim/vim#20380

bcb8dacb6d

Co-authored-by: Borys Lykah <lykahb@fastmail.com>
2026-06-02 07:37:42 +02:00
glepnir
a5d4b4e0fc vim-patch:9.2.0585: line number wrong after undoing a deletion in quickfix buffer (#40081)
Problem:  Deleting a quickfix line and undoing it leaves the entry
          pointing one line below where it should.
Solution: Don't shift already cleared entries in qf_mark_adjust.

closes: vim/vim#20379

64982d6010
2026-06-02 07:30:12 +02:00
glepnir
6b6efb37eb vim-patch:9.2.0583: completion: indent not ignored for fuzzy line completion (#40080)
Problem:  Indent is not stripped in whole-line completion (CTRL-X
          CTRL-L).
Solution: Skip the matched line's indent for whole-line matches in
          search_for_fuzzy_match (glepnir).

closes: vim/vim#20405

9fa5f64135
2026-06-02 07:28:23 +02:00
bfredl
fb5aad1d07 Merge pull request #40008 from Rawan10101/feat/wasm-emscripten-zig016
build: add wasm/emscripten build support
2026-06-01 20:36:58 +02:00
Rawan10101
674f3ab4d6 build: add wasm/emscripten build support
- Add is_wasm detection for wasm32-emscripten target
- Add -Demscripten-sysroot option and libc path setup
- Default cross_compiling=true for wasm
- Use lua5.1 instead of luajit for wasm (luajit unsupported)
- Add emscripten include paths to all dependencies
- Build nvim as static library for wasm target
- Add emcc link step with Asyncify and SUPPORT_LONGJMP
- Filter wasm_stubs.c from non-wasm builds

Known limitation: setjmp/longjmp not yet fully functional
due to Zig compiling dependencies outside emcc pipeline.

build: fix wasm emscripten output path tracking
2026-06-01 16:10:27 +03:00
zeertzjq
edcaf1887a vim-patch:partial:9.2.0573: Vim9: missing EX_WHOLE on some block keywords (#40071)
Problem:  Several Vim9 keywords lack EX_WHOLE and can be shortened in
          Vim9 script, inconsistent with endif/enddef/endfor/endwhile/
          endtry which already have it.  The error from :endd in a
          nested function also hardcodes "enddef" instead of reporting
          what the user typed.  fullcommand("ho") returns "horizontal"
          even though :ho is below the documented 3-char minimum.
Solution: Add EX_WHOLE to :class, :def, :endclass, :endinterface,
          :endenum, :public and :static.  In get_function_body() pass
          the user-typed command to the error message.  Force :ho to
          CMD_SIZE in find_ex_command() so fullcommand() reflects the
          modifier minimum.  Extend tests and documentation accordingly
          (Peter Kenny).

fixes:  vim/vim#20032
closes: vim/vim#20191

38d9a16eba

Co-authored-by: Peter Kenny <github.com@k1w1.cyou>
2026-06-01 01:04:30 +00:00
zeertzjq
71a02e261d vim-patch:9.2.0575: tests: filetype test for v9.2.0557 can be improved (#40070)
Problem:  tests: filetype test for v9.2.0557 can be improved
Solution: Use a correct Kawasaki robot AS test file
          (Patrick Meiser-Knosowski)

related: vim/vim#20370
closes:  vim/vim#20387

0878792046

Co-authored-by: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
2026-06-01 08:46:34 +08:00
Luuk van Baal
9cf684ed7d fix(float): validate conflicts for nvim_win_set_config()
Problem:  nvim_win_set_config() does not error on flags not allowed for
          non-floating windows.
          `hide` should not be allowed for non-floating windows.
Solution: Check that a window is a split when reconfiguring.
          Error when trying to hide a split window.
2026-06-01 01:02:01 +02:00
Luuk van Baal
1ca65faca6 test(screen_basic_spec): use default highlight attrs 2026-05-31 23:18:53 +02:00
Luuk van Baal
253378f86a perf(redraw): don't redraw hidden windows
Problem:  Hidden windows are redrawn unnecessarily.
Solution: If a window is hidden, don't bother drawing it.
2026-05-31 23:15:39 +02:00
zeertzjq
3f4a108cf4 vim-patch:9.2.0568: pythoncomplete: g:pythoncomplete_allow_import had no effect (#40067)
Problem:  The security patch 9.2.0561 added a vim.eval() call inside
          Completer.evalsource() to honor g:pythoncomplete_allow_import.
          But the 'vim' module is only imported inside the outer
          vimcomplete() / vimpy3complete() function, not at the script's
          top level, so referring to it from a Completer method raises
          NameError.  The surrounding bare 'except' silently swallows
          the error and leaves allow_imports at 0, meaning the opt-in
          never takes effect -- 'import os' (and any other
          buffer-level import) is always skipped, no candidates are
          produced for 'os.<...>' and
          Test_popup_and_preview_autocommand() fails on the Windows
          CI matrix (Linux skips the test because Python 2 is absent).
Solution: Re-import 'vim' at the top of evalsource() in both
          pythoncomplete.vim and python3complete.vim so the eval reads
          the global, and set g:pythoncomplete_allow_import = 1 in the
          test (it is the opt-in intended for callers that trust the
          buffer contents) (thinca).

closes: vim/vim#20386

868ad62cb8

Co-authored-by: thinca <thinca@gmail.com>
2026-05-31 13:00:32 +00:00
zeertzjq
f8a56a8439 vim-patch:6de842c: runtime(autoload): consistently align with TABs in README.txt
closes: vim/vim#20378

6de842c273
2026-05-31 09:36:07 +08:00
zeertzjq
b6a018e54f vim-patch:3b0a32d: runtime(pilrc): fix typo country names in pilrcCountry syntax list
Corrected "Indian" to "India" for accurate naming.

closes: vim/vim#20369

3b0a32d7d8

Co-authored-by: Shuo Wang <wangshuo@kylinos.cn>
2026-05-31 09:36:07 +08:00
zeertzjq
54905409f1 vim-patch:9.2.0566: <C-w>f duplicates window if do_ecmd() is aborted (#40061)
Problem:  If got_int is true when win_close() is called, it unexpectedly
          fails in the branch that detects failure in apply_autocmds().
          This causes wingotofile in do_window() to duplicate current
          window when do_ecmd() is aborted with got_int.
Solution: Fix do_window() to save the got_int value before trying to
          close the split window (Yohei Kojima).

Steps to reproduce:
 1. run `touch a && touch .a.swp && echo a > b && vim b`
 2. Type `<C-w>f`
 3. In the warning dialogue, type `a` to abort
 4. Current window is duplicated

closes: vim/vim#20382

113e507cdd

Co-authored-by: Yohei Kojima <yk@y-koj.net>
2026-05-31 01:21:03 +00:00
glepnir
70cfeabe23 fix(float): title/footer shows printable control chars #40047
Problem:
Literal tab (or other control char) in a float title/footer is
not made printable, so it renders incorrectly instead of as "^I".

Solution:
Normalize title/footer text for display like 'statusline'
tab to "^I", parameterize parse_virt_text() with untab
and recompute the width.
2026-05-30 10:02:16 -04:00
Justin M. Keyes
a9ef076817 Merge #39908 from justinmk/doc2
docs: misc
2026-05-30 07:35:05 -04:00
Justin M. Keyes
f5fae7aa5c docs: misc, options, pos/range 2026-05-30 12:57:24 +02:00
Justin M. Keyes
88f3f0eeec fix(health): sort "Active Features" by name 2026-05-30 12:57:24 +02:00
luukvbaal
6b799ee40a fix(autocmd): never show autocommand windows #40032
Problem:  Redrawing in an autocommand that uses an autocommand window
          (more common since 5181984d) can result in flickering.
Solution: Hide autocommand windows.
2026-05-30 06:55:16 -04:00
zeertzjq
286860fde5 Merge pull request #40054 from zeertzjq/vim-1e45fb1
vim-patch: runtime file updates
2026-05-30 13:31:16 +08:00
zeertzjq
37abcdd044 vim-patch:9.2.0562: filetype: SGF files are not recognized
Problem:  filetype: SGF files are not recognized
Solution: Detect *.sgf as sgf filetype
          (Borys Lykah)

Reference:
https://www.red-bean.com/sgf/index.html

closes: vim/vim#20349

dda45ba88f

Co-authored-by: Borys Lykah <lykahb@fastmail.com>
2026-05-30 11:49:08 +08:00
zeertzjq
de8c2db577 vim-patch:9.2.0561: [security]: possible code execution with python3complete
Problem:  [security]: possible code execution with python3complete
Solution: Disable execution of import/from statements

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-52mc-rq6p-rc7c

4b850457e1

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-30 11:46:27 +08:00
zeertzjq
8b5a8c12cd vim-patch:9.2.0560: filetype: busybox shebang lines are not recognized
Problem:  filetype: busybox shebang lines are not recognized
Solution: Add filetype detection pattern for #!busybox sh, detect
          ash as shell in the shebang lines (Christoffer Aasted).

closes: vim/vim#20358

69f402e97f

Co-authored-by: Christoffer Aasted <dezzadk@gmail.com>
2026-05-30 11:41:23 +08:00
zeertzjq
06c7859220 vim-patch:9.2.0559: filetype: Kaitai struct files are not recogonized
Problem:  filetype: Kaitai struct files are not recogonized
Solution: Detect *.ksy files as yaml filetype (Wu, Zhenyu)

Reference:
https://doc.kaitai.io/

closes: vim/vim#20353

73e619d699

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2026-05-30 11:38:58 +08:00
zeertzjq
824af50fb9 vim-patch:f31407f: runtime(karel): Add indent plugin for Karel
closes: vim/vim#20357

f31407f9fa

Co-authored-by: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
2026-05-30 11:37:28 +08:00
zeertzjq
915fd47601 vim-patch:9.2.0558: filetype: Popcap Reanimation files are not recognized
Problem:  filetype: Popcap Reanimation files are not recognized
Solution: Recognize *.reanim files as xml filetype (Wu, Zhenyu).

Reference:
https://github.com/wszqkzqk/PvZ-Portable

closes: vim/vim#20354

c83d2f888e

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2026-05-30 11:37:01 +08:00
zeertzjq
75a1e1a848 vim-patch:9.2.0557: filetype: Kawasaki Robots files are not recognized
Problem:  filetype: Kawasaki Robots files are not recognized
Solution: Detect *.pg as kawasaki_as filetype, add filetype detection
          for *.as as atlas or kawasaki_as filetype (KnoP-01).

In Kawasaki robots (https://kawasakirobotics.com/products-robots/)
AS language

*.pg is the extention for a program file and
*.as is for a complete backup.

closes: vim/vim#20370

dec3d6c7da

Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
2026-05-30 11:34:48 +08:00
zeertzjq
dab675278f vim-patch:1e45fb1: runtime(karel): Add missing syntax items
Adds
- 'OF' for the SELECT instruction
- 'TO' and 'DOWNTO' for the FOR instruction

closes: vim/vim#20356

1e45fb1a7e

Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
2026-05-30 11:29:31 +08:00
Olivia Kinnear
e728c100b5 feat(lua): support table lhs in vim.keymap.set()/del() #39948
Problem:
It is repetitive to map multiple keymaps to do the same thing. Here are some
cases where being able to do this would be useful:

    -- Visual movement for both j/k and down/up:
    vim.keymap.set({ 'n', 'x' }, { 'j', '<Down>' }, 'v:count == 0 ? "gj" : "j"', { expr = true })
    vim.keymap.set({ 'n', 'x' }, { 'k', '<Up>' }, 'v:count == 0 ? "gk" : "k"', { expr = true })
    -- Map multiple keys to `<Nop>` concisely:
    vim.keymap.set({ 'n', 'x' }, { '<Leader>', '<Localleader>', '<CR>' }, '<Nop>')
    -- Remove multiple keymaps at once:
    vim.keymap.del('n', { 'gri', 'grn', 'grr' })

Solution:
Support the `lhs` of `vim.keymap.set()` and `vim.keymap.del()` being a table, in
the same way that `modes` can be.
2026-05-29 14:45:33 -04:00
abdulahmoda
4b5f026ac9 fix(vim.fs): fs.dir() may return nil "type" on some filesystems #39749
Problem:
Currently, only some filesystems (Btrfs, ext2, ext3, ext4) have full
support of accessing the `dirent` entry-type. On other filesystems,
`uv.fs_scandir_next` may return `nil` for an existing but unsupported
entry-type.

This means consumers (such as `fs.dir()`), cannot know if `nil` means
"non-existent" or "unsupported".

Solution:
Fall back to `uv.fs_lstat` when `etype` is `nil`; return "unknown" if it
fails.
2026-05-29 14:24:22 -04:00
atusy
ac352a6df6 docs(treesitter): describe pattern_id of captures 2026-05-29 13:09:29 +02:00
github-actions[bot]
5160ed4532 docs: update version.c #39776
vim-patch:950f501a1 runtime(doc): Fix file mode for the Italian manpage
vim-patch:9.2.0482: runtime(osc52): triggered twice with TextPutPoste autocmd
vim-patch:7cb86f46c CI: Bump the github-actions group across 1 directory with 2 updates
vim-patch:8ae45e420 NSIS: Don't install 32-bit dll on ARM64
vim-patch:403ba303b ccfilter: uses unbounded strcat()/strcpy()
vim-patch:ab24858cf CI: Update clang to v22
vim-patch:9.2.0492: popup: decoration wrongly drawn with clipping on border
vim-patch:9.2.0498: potential heap buffer overflow in if_xcmdsrv.c
vim-patch:6daa721dc runtime(doc): INSTALL: "libwayland-dev" is required on Ubuntu for Wayland clipboard support
vim-patch:9b1d657bc CI: Stop using AppVeyor
vim-patch:7a57f5975 runtime(syntax-tests): Always delete our copy of "src/testdir/vimcmd"
vim-patch:9.2.0503: Makefile: Missing dependencies for new GTK4 source files
vim-patch:9.2.0504: configure: requires X11 libraries for GTK4 build
vim-patch:9.2.0505: GTK4: text looks blurry on HiDPI displays
vim-patch:aee12156e runtime(doc): fix GTK4 package name in src/INSTALL
vim-patch:1dfaeb4fa runtime(doc): re-generate vim.man
vim-patch:9.2.0511: configure: when GTK4 is used also links in X11 libs
vim-patch:9.2.0514: GTK4: build errors when socketserver is enabled
vim-patch:37223f47b CI: Bump github/codeql-action
vim-patch:9.2.0518: GTK4: input method cannot compose text
vim-patch:9.2.0519: GTK4: GUI tabline is not displayed correctly
vim-patch:9.2.0521: GTK4: cannot resize shell after the window is shown
vim-patch:5e3056ee8 translation(it): Update Italian manpage
vim-patch:9.2.0527: Possible double free in fill_partial_and_closure()
vim-patch:9.2.0528: possible overflow in XIM resource handling
vim-patch:9.2.0529: GTK4: clipboard returns empty after a foreign app takes the selection
vim-patch:3b8ac8f8a CI: Split platform specific CI configurations into separated files
vim-patch:9.2.0532: GTK: preedit font size is wrong for fractional point sizes
vim-patch:9.2.0537: GTK4: mouse popup menu does not show up at mouse pointer
vim-patch:9.2.0541: Vim9: endclass/endenum/endinterface can give errors
vim-patch:9.2.0542: tests: test_codestyle fails
vim-patch:915e68e21 translation(it): Update Italian manpage
vim-patch:9.2.0543: Vim9: wrong error when redeclaring a typed variable
vim-patch:9.2.0544: GTK4: window blank after a resize or drag
vim-patch:9.2.0546: configure: GTK4 build requires GTK >= 4.10
vim-patch:9.2.0548: GTK4: terminal and pty job output is not processed
vim-patch:9.2.0550: GTK4: 'mousehide' unhides cursor when switching tabs
vim-patch:9.2.0552: GTK4: F10 does nothing when the menubar is hidden

vim-patch:0fa3603: runtime(doc): update cmdline-history (after v9.1.0895)
vim-patch:9.2.0526: missing out-of-memory check in ex_substitute()
vim-patch:9.2.0554: GTK4: memory leak in free_menu()
2026-05-29 06:06:14 -04: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
zeertzjq
1a7ab1ab47 vim-patch:9.2.0555: too many strlen() in ex_substitute() (#40042)
Problem:  too many strlen() in ex_substitute()
Solution: Use string_T type instead of recomputing the length
          (John Marriott).

closes: vim/vim#20336

8e7e5d5488

Co-authored-by: John Marriott <basilisk@internode.on.net>
2026-05-29 10:37:17 +08:00