Commit Graph

36480 Commits

Author SHA1 Message Date
Matthew Hughes
c06e3d6f81 fix(termdebug): evaluate display with gdb pretty print #39453
Calling `set print pretty on` in GDB will:

> Cause GDB to print structures in an indented format with one member
per line

However, `termdebug` just renders the newlines as raw `\n` characters.
This is a regression of[1]. Glancing through the history it looks to
have been caused by cd1b14f027 which
removed the output splitting when displaying the eval results, so this
changes adds that behaviour back.

As a quick reproduction/test, compile the following C program:

```c

struct Foo {
    char *name;
};

int main(void) {
    struct Foo f = {"hello"};
    printf("%s\n", f.name);

    return 0;
}
```

Then launch `nvim` and run:

    :Termdebug main
    :Gdb
    (gdb) set print pretty on
    (gdb) break main
    (gdb) run
    :Source

Place the cursor on the `f` variable and call `:Evaluate`. Before this change:

![](https://github.com/user-attachments/assets/51318e1e-9cdd-43ab-aa35-4aaad1d9f65f)

With this change:

![](https://github.com/user-attachments/assets/33874679-21b4-4d07-98ef-c2c9e9d19dd6)

Link: https://github.com/neovim/neovim/issues/10020 [1]
2026-04-28 10:13:56 -04:00
Chip Senkbeil
45c5cbb4c5 feat(health): vim.ui.img healthcheck #39449 2026-04-28 10:12:13 -04:00
luukvbaal
62db5bebdd fix(messages): message kind for :recover and swapfile attention #39444
Problem:  No message kind and multiple events for :recover and
          (non-prompt) swapfile attention messages.
Solution: Assign these the "list_cmd" and "wmsg" kind.
2026-04-28 10:05:06 -04:00
zeertzjq
72bc6c5801 vim-patch:9.2.0405: when jumping to tags, will open URLs (#39461)
Problem:  when jumping to tags, will open URLs
          (Srinivas Piskala Ganesh Babu)
Solution: Disallow trying to open remote files.

closes: vim/vim#20068

Supported by AI

ae196b2d58

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-28 08:07:57 +08:00
zeertzjq
e4458b7f24 vim-patch:96be273: runtime(doc): fix :z command description again (#39459)
96be27309c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-28 07:20:43 +08:00
Barrett Ruth
0a7201095b vim-patch:9.2.0400: sandbox callbacks selected through 'complete' (#39452)
Problem:  Modeline-tainted 'complete' values can invoke completion
          callbacks outside the sandbox.
Solution: Enter the sandbox for both 'complete' callback phases and add
          a regression test (Barrett Ruth)

closes: vim/vim#20078

dd9b31fb62
2026-04-27 23:09:33 +00:00
Till Bungert
a0820481f2 fix(excmd): use realtime for v:starttime, :uptime #39425
Problem:
`v:starttime`, `:uptime` use a monotonic high-resolution timer. This
only works as long as the timer keeps running (if the computer is
suspended the timer is paused). This is somewhat unintuitive, and
doesn't match the behavior of the `uptime` shell command.

Solution:
Implement `os_realtime` to get the real time since the
epoch in nanoseconds.
2026-04-27 19:01:47 -04:00
zeertzjq
46c83ce321 fix(marks): don't use spell decorations from other lines (#39441)
Spell decorations from other lines aren't relevant to the current line.
Also, decor_redraw_col() can only go forward, while spell navigation
needs to go both forward and backward.
2026-04-28 07:00:23 +08:00
Olivia Kinnear
3411c95828 docs(lua): place vim.ui.img section after vim.ui #39456 2026-04-27 16:56:25 -04:00
Yi Ming
d40875a2f8 perf(vim.pos): use numeric index internally #39447 2026-04-27 13:43:46 -04:00
Lewis Russell
c822a2657c refactor(lua): move vim.wait into runtime Lua
Move vim.wait into runtime/lua/vim/_core/editor.lua and replace
the C entrypoint with narrow vim._core helpers for polling, UI
flushing, and interrupt checks.

Keep the existing interval semantics by retaining the dummy timer that
wakes the loop while it is otherwise idle.

Update the docs to describe the success return values correctly, and
adjust the test expectation for the new vim.validate() callback error.

AI-assisted: Codex
2026-04-27 11:33:47 +01:00
glepnir
4431713285 feat(events)!: support Optionset modified, drop BufModifiedSet #35610
Problem:
BufModifiedSet autocmd only triggered for current buffer during
redraw, causing delayed events when :wa writes non-current buffers.

Solution:
- Use the aucmd_defer approach to implement `Optionset modified`.
- Drop BufModifiedSet.
2026-04-27 06:30:11 -04:00
github-actions[bot]
695e4f8112 docs: update version.c #39257
vim-patch:8.2.4250: channel out callback test is flaky on Mac
vim-patch:9.0.1004: suspend test sometimes fails on MacOS
vim-patch:9.0.1006: suspend test still sometimes fails on MacOS
vim-patch:9.0.1013: suspend test often fails on Mac OS
vim-patch:9.0.1018: suspend test still fails on Mac OS
vim-patch:9.0.1022: suspend test fails on Mac OS when suspending Vim
vim-patch:9.2.0076: [security]: buffer-overflow in terminal handling
vim-patch:9.2.0085: tests: test_clientserver.vim is flaky
vim-patch:9.2.0358: runtime(vimball): still path traversal attacks possible
vim-patch:9.2.0375: prop_find() does not find a virt text in starting line
vim-patch:9.2.0376: Vim9: elseif condition compiled in dead branch
vim-patch:9.2.0381: Vim9: Missing check_secure() in exec_instructions()
vim-patch:0f9218851 translation(ru): Fix typo in "може" to "можете" in lang/README.ru.txt
vim-patch:9.2.0391: tests: Comment in test_vim9_cmd breaks syntax highlighting
vim-patch:9.2.0393: MS-Windows: link error with XPM support on UCRT64
vim-patch:e7eef554f CI: Bump the github-actions group across 1 directory with 3 updates
vim-patch:807f2cd78 CI: Fix syntax error in lychee URL checker
vim-patch:9.2.0394: xxd: offsets greater than LONG_MAX print as negative
vim-patch:9.2.0396: tests: Test_error_callback_terminal is flaky on macOS

vim-patch:9.2.0377: Using int as bool type in gui_T struct

vim-patch:9.0.1418: the included xdiff code is a bit outdated
vim-patch:9.0.1699: compile warning for xdiff/xutils on MS-Windows
vim-patch:9.0.2093: Unsupported option causes skipping of modeline test

vim-patch:9.1.1921: xdiff: included xdiff code is outdated
vim-patch:9.1.1926: xdiff: Coverity warning with MAX_CNT/UINT_MAX usage

vim-patch:9.2.0189: MS-Windows: opacity popups flicker during redraw in the console
2026-04-27 06:11:21 -04:00
Christian Clason
ca1c28c2a8 build(deps): bump tree-sitter to fb348c349 2026-04-27 10:38:09 +02:00
Lewis Russell
aeba27f37b feat(doc): document Lua alternative for vim.fn
AI-assisted: Codex
2026-04-27 09:06:11 +01: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
zeertzjq
f69aadd2b4 Merge pull request #39435 from zeertzjq/vim-0ca1121
vim-patch: runtime file updates
2026-04-27 07:02:53 +08:00
zeertzjq
9505dfb9ed vim-patch:076366b: runtime(javascript): Fix regex highlighting after (
- Fix regex highlighting after opening parens, javascriptParens was
  matching later.  Fixes issue vim/vim#20069.
- Add missing regex flags.
- Mark the file as unmaintained.  Thanks Claudio for all your work.

closes: vim/vim#20076

076366bd4e

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-04-27 06:21:25 +08:00
zeertzjq
5834743735 vim-patch:c23bfd7: runtime(help): fix wrong check for existing HelpComplete function
To check for an existing HelpComplete function, exists('*HelpComplete')
should be used, as exists('HelpComplete') still returns 0 after sourcing
the ftplugin.

closes: vim/vim#20073

c23bfd7922
2026-04-27 06:21:25 +08:00
zeertzjq
f0ad84366a vim-patch:3cc7d50: runtime(algol68): Add new syntax file, ftplugin and filetype detection
- Add a syntax file update to Neville Dempsey's long-serving version
- Add a new rudimentary ftplugin
- Add filetype detection

Changes to the syntax file include:
- improved prelude, number and symbol highlighting
- prelude highlighting tests
- updated boiler plate

Note that these runtime files currently target Algol 68 Genie employing
the default UPPER stropping regime.  Support for GNU Algol 68 should
also be usable with the UPPER stropping regime, although somewhat less
complete.  Full support for the SUPPER stropping regime in GNU Algol 68
is also planned.

closes: vim/vim#19818

3cc7d50716

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-04-27 06:21:25 +08:00
zeertzjq
736b28630e vim-patch:1ce03d6: runtime(dockerfile): Update syntax, fix RUN command highlighting
Allow for docker comments to be interspersed in a multiline (continued)
RUN command argument.

fixes:  vim/vim#8364
closes: vim/vim#19829

1ce03d674a

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-04-27 06:21:25 +08:00
zeertzjq
9c3b2da4f6 vim-patch:bf6892a: runtime(doc): Update documentation on :z
bf6892aaab

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-27 06:21:25 +08:00
zeertzjq
91a15b7137 vim-patch:0ca1121: runtime(help): make help omnifunc global
closes: vim/vim#20024

0ca1121d1f

Co-authored-by: Peter Cardenas <16930781+PeterCardenas@users.noreply.github.com>
2026-04-27 06:21:25 +08:00
zeertzjq
b26b543f16 docs: fix CI failure #39436 2026-04-26 18:20:46 -04:00
Chip Senkbeil
5f9e828008 feat(ui): vim.ui.img api #37914
Problem:
No builtin api to load and display images.

Solution:
Introduce vim.ui.img. Only supports kitty graphics protocol, currently.
2026-04-26 18:07:05 -04:00
Daigo Yamashita
8308544fe5 fix(lsp): handle relative='editor' in make_floating_popup_options() #39320
Problem:  With `vim.g.health = { style = 'float' }`, running
          `:checkhealth` from a `:help` buffer placed the float in the
          top-left corner instead of centered.
          make_floating_popup_options() picks the NW/NE/SW/SE anchor
          and the available height from cursor-relative metrics
          (winline(), wincol(), winheight()). When the caller passes
          relative='editor', those metrics are meaningless, so the
          function could flip to an 'E' anchor and clamp the float
          off-screen.
Solution: When relative='editor', treat the whole editor area as
          available space (lines_above=0, lines_below=&lines,
          wincol=0). This makes the NW anchor the natural choice and
          keeps the float position stable regardless of where the
          cursor is in the current window.

AI-assisted: Claude Code
2026-04-26 15:41:13 -04:00
Justin M. Keyes
834047cb14 Merge #39427 from justinmk/doc2 2026-04-26 14:39:29 -04:00
Justin M. Keyes
2d9e1ebb50 docs: sort quasi-keysets 2026-04-26 20:25:49 +02:00
Justin M. Keyes
033efbbd32 build(docs): sort/lint class fields and keysets
Problem:
Fields (key names) in classes, keysets, and quasi-keysets are ordered
randomly, which adds friction when reading docs.

Solution:
- Sort class fields and keysets when generating docs.
- Add a lint check for quasi-keysets (keysets defined as unstructured
  markdown lists within a docstring).
2026-04-26 20:25:48 +02:00
Justin M. Keyes
1e3e06f582 Merge #39398 from justinmk/doc2 2026-04-26 09:56:29 -04:00
Justin M. Keyes
6d0cdcd605 fix(eval): writestring() handling of null #39328
Problem:
- write_blob, write_string dereference args which may be NULL.
- `writefile(v:_null_blob, …)` fails.

Solution:
- Fix the annotation.
- Handle null blob.

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2026-04-26 09:55:52 -04:00
Justin M. Keyes
d960ae6760 docs: vim.ui.select, misc 2026-04-26 14:18:00 +02:00
Justin M. Keyes
825bfba789 docs: lsp.CodeActionContext, nested @inlinedoc
- fix https://github.com/neovim/neovim/issues/39208
- fix generation of neste `@inlinedoc` classes
2026-04-26 13:29:43 +02:00
Luis Calle
682067c46a fix(vim.range): validate arguments on all cases #39415 2026-04-26 06:35:21 -04:00
Luis Calle
0b7a291238 feat(vim.pos): accept buf=0 for current buf #39414 2026-04-26 06:34:18 -04:00
zeertzjq
0039a13fe4 vim-patch:9.2.0395: tests: Test_backupskip() may read from $HOME (#39417)
Problem:  tests: Test_backupskip() may read from $HOME
Solution: Set $HOME to an empty value, use --clean
          (D Ben Knoble)

Even though we unset HOME, we can see via scriptnames that user files
are still sourced! One of my installed plugins warns when not compiled
with +python3, so this test has a "press Enter" prompt.

Use `--clean` like most other GetVimProg()'s do to fix it. Some tests
use `system()` instead, but that turns this test into a failure rather
than passing; I'm not sure why other tests don't suffer from this.

To prove to ourselves, we can use code like this:

    diff --git i/src/testdir/test_options.vim w/src/testdir/test_options.vim
    index a408e20e1..044364a54 100644
    --- i/src/testdir/test_options.vim
    +++ w/src/testdir/test_options.vim
    @@ -1179,6 +1179,7 @@ func Test_backupskip()
       " P_NODUP).  Run this in a separate instance and write v:errors in a file,
       " so that we see what happens on startup.
       let after =<< trim [CODE]
    +      call writefile([execute('scriptnames')], 'foo')
           let bsklist = split(&backupskip, ',')
           call assert_equal(uniq(copy(bsklist)), bsklist)
           call writefile(['errors:'] + v:errors, 'Xtestout')
    @@ -1196,7 +1197,7 @@ func Test_backupskip()
       " unset $HOME, so that it won't try to read init files
       let saveenv['HOME'] = getenv("HOME")
       call setenv('HOME', v:null)
    -  exe 'silent !' . cmd
    +  exe 'silent !' . cmd .. ' --cmd "echo &rtp"'
       call assert_equal(['errors:'], readfile('Xtestout'))

       " restore environment variables

Here, that causes "foo" to include a bunch of files under ~/.vim. I'm
not sure why this happens, but lets paper over it for the test.

We can also tell that (orthogonal to --clean) setting HOME='' works too.
Let's do that in addition since unsetting HOME isn't quite enough.

closes: vim/vim#20051

8d9c383aaf

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2026-04-26 16:59:32 +08:00
zeertzjq
924dbf10b8 vim-patch:5f7c524: runtime(doc): Update the ga output to match the actual output (#39412)
5f7c52408f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-25 23:17:17 +00:00
zeertzjq
cdd5009824 vim-patch:8.2.1498: on slow systems tests can be flaky (#39413)
Problem:    On slow systems tests can be flaky.
Solution:   Use TermWait() instead of term-wait(). (Yegappan Lakshmanan,
            closes vim/vim#6756)

733d259a83

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2026-04-25 23:03:40 +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
Justin M. Keyes
e474c9856d Merge #39350 from echasnovski/pack-confirm-gx 2026-04-25 14:01:57 -04:00
Barrett Ruth
3d96095a0f ci(reviewers): cancel redundant reviewer assignment runs per PR #39404
Problem: The reviewer assignment workflow can run multiple times for
the same PR.

Solution: Ensure only the newest review-assignment run continues with
workflow concurrency.
2026-04-25 13:49:39 -04:00
Barrett Ruth
1aeaa61bcf ci(news): only rerun on ci:skip-news label changes #39399
Problem: The news workflow reruns on unrelated label events.

Solution: Only reevaluate the job when the changed label is
`ci:skip-news`.
2026-04-25 13:47:33 -04:00
Evgeni Chasnovski
e45cdbc7c4 fix(util): add and use forge link computation
Problem: There are many Git forges each with a different way of
  constructing permanent links to like commits and tags.

Solution: Add a private utility function that computes these special
  links on the best effort basis.
2026-04-25 20:29:19 +03:00
Evgeni Chasnovski
d01dc690e1 feat(pack): support textDocument/documentLink in confirmation buffer
Problem: In `vim.pack.update()` confirmation buffer it might be useful
  to be able to use `gx` (open link at cursor) when cursor is on
  something like commit or tag.

Solution: Add `textDocument/documentLink` method support for the
  in-process LSP. This may be used by LSP clients and makes `gx`
  automatically work.

  The shortcoming is that this requires tracking how to construct a URL
  from source and commit/tag. Currently only GitHub hosted repositories
  are supported.
2026-04-25 20:28:43 +03:00
Evgeni Chasnovski
c44df255aa docs(vim.ui): "preview" interface for vim.ui.select() #37360
Problem: Plugins may want to have a way to show more details about items
  when using `vim.ui.select`. This is a fairly common problem that
  prompts plugin authors to implement dedicated sources/pickers for
  fuzzy picker plugins that are popular at the moment.

Solution: Document a way for `vim.ui.select` to provide preview:
  - `vim.ui.select` users can provide `opts.preview_item` function that
    creates/uses a buffer and its contents at certain position to show
    more details about an item.
  - `vim.ui.select` implementations may use `opts.preview_item` in the
    way they see fit (like show the buffer in a separate/same window
    interactively/on-demand or do nothing) if they have a way to show
    more information about an item.
2026-04-25 13:03:55 -04:00
Yi Ming
775c7d1b53 fix(lsp): check window is still valid after async request #39396
Problem:
Since `foldclose` is async, it must wait for the request to return before actually executing, at which point the original window may no longer be valid.

Solution:
Check whether the window is valid before actually performing `foldclose`.
2026-04-25 12:11:09 -04:00
Peter Cardenas
eeee4bd4fc feat(treesitter/extmark): support removing a conceal highlight #35087
Problem:
Cannot remove a `@conceal` highlight when defined in highlights.scm.

Solution:
Support a `@noconceal` highlight that works similarly to `@nospell` where it
overrides the conceal set on the range to remove it. Additionally, can
set the conceal metadata field to false for the same behavior.
2026-04-25 11:42:44 -04:00
Justin M. Keyes
b70224e3bd docs: misc #39256 2026-04-25 11:16:18 -04:00
Justin M. Keyes
cb6c4cadf5 Merge #39389 from ofseed/lsp-parse-perf 2026-04-25 11:08:04 -04:00
Justin M. Keyes
0a9016689e ci: ensure full sanitizer logs are shown in CI #39361
Problem:
When ASAN detects an error in a child process, the process may be killed
by test teardown before ASAN finishes writing its log file. This results
in truncated logs with no stack trace.

Also, the sanitizer log content was only written to stdout (which the
test runner may not display) and not included in the test_assert error
message.

Solution:
- Poll (up to 2s) for the ASAN "SUMMARY" line before reading, so the
  crashing process has time to finish writing.
- Include full log content in the test_assert error message, so it
  appears in CI output regardless of stdout handling.
- Warn when the log appears truncated (no SUMMARY line found).
2026-04-25 10:33:39 -04:00