Commit Graph

37293 Commits

Author SHA1 Message Date
zeertzjq
8a87b4cc67 vim-patch:9.2.0794: extend() and extendnew() don't handle NULL expr2 properly (#40814)
Problem:  extend() and extendnew() don't handle NULL expr2 properly
          (Mao-Yining)
Solution: Still set the return value when expr2 is NULL (zeertzjq).

fixes:  vim/vim#20758
closes: vim/vim#20759

e397c82a04
2026-07-18 23:09:45 +08:00
Justin M. Keyes
c6d885b0a6 Merge #40813 test: local failures, "succeeded immediately" 2026-07-18 10:48:43 -04:00
zeertzjq
650299fba0 vim-patch:9.2.0787: regexp: code 0x1ecb duplicated for equivalence class (#40808)
Problem:  regexp: code 0x1ecb duplicated for equivalence class
          (Sami Farin)
Solution: Remove it

fixes:  vim/vim#8029#issuecomment-4998990223
closes: vim/vim#20782

c7feefe170

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-18 14:32:30 +00:00
zeertzjq
ee51e7bd11 vim-patch:922d991: runtime(cuda): Fix typo in cuda syntax file (#40810)
related: vim/vim#20773

922d991f77

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-07-18 22:20:00 +08:00
zeertzjq
721569dd9b vim-patch:9.2.0788: filetype: hip files are not recognized (#40809)
Problem:  filetype: hip files are not recognized
Solution: Detect *.hip files as hip filetype, include filetype, syntax
          and indent plugins, update makemenu.vim and synmenu.vim (Young)

Round out HIP (Heterogeneous-compute Interface for Portability) support
to mirror the existing CUDA files:

- autoload/dist/ft.vim: detect the ".hip" extension as filetype "hip"
- ftplugin/hip.vim: behave like C++ by sourcing ftplugin/cpp.vim
- indent/hip.vim: use cindent, like indent/cuda.vim
- makemenu.vim / synmenu.vim: add a Syntax menu entry

The syntax/hip.vim file already sources syntax/cpp.vim and adds the
HIP-specific keywords, matching syntax/cuda.vim.

closes: vim/vim#20773

b3ad239038

Co-authored-by: Young <young20050727@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 22:19:48 +08:00
Justin M. Keyes
9129bb04ca test(pack): "vim.pack" tests fail on local machine 2026-07-18 16:09:00 +02:00
Justin M. Keyes
cef1140785 test(tui): avoid "Screen test succeeded immediately" warning 2026-07-18 16:09:00 +02:00
Justin M. Keyes
27999c571c test(tui): failures if build lacks terminfo 2026-07-18 16:09:00 +02:00
Justin M. Keyes
99a16121d4 test: unreliable "put command . register special … ring the bell" #40812
Problem:

    FAILED   …/put_spec.lua:894: …/put_spec.lua @ 898: put command . register special tests should ring the bell when deleting if not appropriate
    …/put_spec.lua:894: …/put_spec.lua:898: Bell was not rung after action

    Snapshot:
    screen:expect([[
      ^ine of words 1                                       |
      Line of words 2                                      |
      {1:~                                                    }|*4
      {3:[No Name] [+]                                        }|
                                                           |
      {1:~                                                    }|*4
      {UNKNOWN_HL_ID(4):[No Name]                                            }|
      {UNKNOWN_HL_ID(1):                                                     }|
    ]])
    stack traceback:
    …/ui/screen.lua:917: in function '_wait'
    …/ui/screen.lua:540: in function 'expect'
    …/editor/put_spec.lua:894: in function 'bell_test'
    …/editor/put_spec.lua:940: in function <…/editor/put_spec.lua:932>

Analysis:
The bell was asserted via the UI 'bell' event (screen.bell), but
vim_beep() rate-limits that to 3 per 500ms. These tests share one
long-lived session, so beeps from earlier tests could exhaust the window
and drop the asserted beep.

Solution:
Use assert_beeps()/assert_nobeep(), which check called_vim_beep (set
before the rate-limit gate).
2026-07-18 07:48:36 -04:00
Barrett Ruth
b2bb60d70a fix(ui2): avoid ModeChanged in message window #40788 2026-07-18 07:33:38 -04:00
Christian Clason
7e91f21986 build(deps): bump luajit to 14d8a7a27 2026-07-18 12:54:34 +02:00
zeertzjq
1520a4e3e6 vim-patch:9.2.0786: filetype: Containerfile is not recognized (#40807)
Problem:  filetype: Containerfile is not recognized
Solution: Detect *.[Cc]ontainerfiles as dockerfile filetype
          (Omer Tuchfeld)

closes: vim/vim#20783

Supported by AI.

6b62ae68c6

Co-authored-by: Omer Tuchfeld <omer@tuchfeld.dev>
2026-07-18 17:59:52 +08:00
Justin M. Keyes
5e2ad295c0 test: unreliable ":terminal buffer … partial mappings" #40806
Problem:

    FAILED   …/terminal/buffer_spec.lua @ 348: :terminal buffer is refreshed with partial mappings in Normal mode
    …/terminal/buffer_spec.lua:348: Row 2 did not match.
    Expected:
      |tty ready                                         |
      |*^jjjjjjjjjj                                        |
      |                                                  |
      |                                                  |
      |                                                  |
      |                                                  |
      |                                                  |
    Actual:
      |tty ready                                         |
      |*^jjjjjjjjj                                         |
      |                                                  |
      |                                                  |
      |                                                  |
      |                                                  |
      |                                                  |

Solution:
Increase sleep time.
2026-07-18 05:39:36 -04:00
Justin M. Keyes
9abe01c7be test: unreliable "bumps 'busy' on each watched buffer" #40804
Problem:
Sampling a transient busy=1 pulse is racy under load.

Solution:
Set a long debounce, assert the stable state, then use a short debounce
to let the reload clear it.
2026-07-18 05:01:41 -04:00
Justin M. Keyes
446b9d8c55 docs: misc, remove some old help tags #40214
- Remove old help tags: they add noise to cmdline completion.

Co-authored-by: acehinnnqru <acehinnnqru@gmail.com>
Co-authored-by: KangaZero <samuelyongw@gmail.com>
Co-authored-by: Simone Ragusa <hi@interrato.dev>
Co-authored-by: Chinmay Dalal <~chinmay/public-inbox@lists.sr.ht>
Co-authored-by: coyaSONG <66289470+coyaSONG@users.noreply.github.com>
Co-authored-by: Olivia Kinnear <git@superatomic.dev>
2026-07-18 04:29:51 -04:00
github-actions[bot]
1cb0bbe798 docs: update version.c #40783
vim-patch:98056533b Vim 8.2 release
vim-patch:495282b6e Correct list of patch numbers
vim-patch:85d9b03f8 Correct list of patches.
vim-patch:8.2.2598: Vim9: :open does not need to be supported
vim-patch:8.2.4606: test fails because of changed error message
vim-patch:9.0.0014: missing part of the test override change
vim-patch:9.0.0515: virtual text highlight starts too early when 'number' is set
vim-patch:9.0.0516: virtual text "above" highlights gap after it
vim-patch:9.0.0518: virtual text highlight starts too early with 'nowrap'
vim-patch:9.0.0698: VisVim is outdated, does not work with current Visual Studio
vim-patch:9.0.0833: Mac: no +sound feature in huge build
vim-patch:9.0.1124: virtual text at a column position is truncated
vim-patch:9.0.1463: virtual text truncation only works with Unicode 'encoding'
vim-patch:9.0.1482: crash when textprop has a very large "padding" value
vim-patch:9.0.1695: Crash with overlong textprop above
vim-patch:9.1.0139: MS-Windows: ligatures map cleared on startup
vim-patch:9.1.0368: MS-Windows: Hard to define the Vim Patchlevel with leading zeroes
vim-patch:20393bc02 runtime(doc): update last change date for diff.txt
vim-patch:c49cb93a8 patch 9.1.1392: missing patch number
vim-patch:9.1.1397: tabpanel not correctly updated on :tabonly
vim-patch:9.1.1530: Missing version change in v9.1.1529
vim-patch:689f3bf31 runtime(doc): clarify C99 constraints and portability assumptions
vim-patch:9.1.1589: Cannot disable cscope interface using configure
vim-patch:9.1.1637: FEAT_DIFF used in diff.pro
vim-patch:2d4eb6ee1 runtime(doc): Remove dead link from todo.txt
vim-patch:6d8307fc2 runtime(doc): Add a Development policy
vim-patch:9.1.1982: Use after free with redraw_listener_add()
vim-patch:9.1.2084: Compile error when build with job feature
vim-patch:9.1.2115: CI: wrong preprocessor indentation
vim-patch:9.2.0764: Compiler warning about unused function
vim-patch:b212f440a CI: Bump the github-actions group across 1 directory with 2 updates

Co-authored-by: marvim <marvim@users.noreply.github.com>
2026-07-18 04:20:48 -04:00
Barrett Ruth
12e8db3847 fix(restart): distinguish v:exitreason for :restart! #40801 2026-07-18 04:07:14 -04:00
Kyle
28818702e9 fix(tui): urxvt reset cursor style #40800
Problem:
urxvt doesn't support resetting to default cursor style like we assumed.
https://github.com/neovim/neovim/issues/38987#issuecomment-5004636437

Solution:
Instead of the reset sequence, always set it to steady block. This will
still be wrong for users who configured their initial cursor to
underline, but it's about the best we can do.
2026-07-17 21:07:58 -04:00
glepnir
9fae7234f6 feat(completion): support completionList.applyKind #40769
Problem: values from completionList.itemDefaults always replace the
item's own commitCharacters and data. Since 3.18 a server can ask for
them to be merged instead.

Solution: Handle CompletionList.applyKind and advertise applyKindSupport.
Drop itemDefaults once folded into the items: get_items() runs twice on
the same result and a Merge isn't idempotent.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#completionItemApplyKinds
2026-07-17 21:07:01 -04:00
zeertzjq
a2e36d8df8 vim-patch:528adbd: runtime(netrw): Fix reset_ssl reference error on file rename (#40799)
fixes:  vim/vim#20710
closes: vim/vim#20777
closes: vim/vim#20698

528adbd757

Co-authored-by: yasuda <yasuda@kyoto-sr.co.jp>
Co-authored-by: Doruk Özer <dorukozer@protonmail.com>
2026-07-18 06:44:43 +08:00
zeertzjq
844f045078 vim-patch:9.2.0783: tests: personal spell files leak into later tests (#40798)
Problem:  Test_spelldump_prefixtree_overflow() resets 'runtimepath' to
          defaults, which can expose personal spell files to later tests
          (Jun-ichi Takimoto, after v9.2.0662)
Solution: Save and restore the test runner's 'runtimepath' value (coyaSONG).

fixes:  vim/vim#20765
closes: vim/vim#20766

f16e30e19d

Co-authored-by: coyaSONG <66289470+coyaSONG@users.noreply.github.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
2026-07-18 06:41:02 +08:00
Justin M. Keyes
a373466cd9 test: unreliable "bumps 'busy' on each watched buffer" #40794
Problem:
Test still unreliable.

Solution:
Don't require both 'busy' pulses to coincide.

followup to #40775
2026-07-17 16:45:11 -04:00
Justin M. Keyes
e0e7f65b74 refactor(detach): eliminate nvim__ui_detach #40793
Problem:
`nvim__ui_detach` was added in 85e0559d46 in order to implement
`detach_others` from Lua. Using Lua in this case is doing more harm than
good.

Solution:
Extract `ui_detach_channel`, which also allows it to be used for the
"self detach" path from `ex_detach`.

Bonus: the old MSWIN path always called `os_swap_to_hidden_console()`;
now `ui_detach_channel` only does so for a stdio channel. For the common
stdio TUI this is identical; for a socket UI it's more correct (no
parent console to swap).
2026-07-17 16:37:45 -04:00
Jason Woodland
85e0559d46 feat(ui): ":%detach!" detaches all other UIs #39216
Problem:
Not easy for one UI to kick the others off a shared Nvim server.

Solution:
Treat `:%detach` as detach-other-UIs.
2026-07-17 15:23:34 -04:00
MAAZIZ Adel Ayoub
9d3edf345f fix(path): avoid shell fallback for unknown users #40757
Problem:
Expanding an unknown ~user path falls back to the shell. In a fast event,
this re-enters the event loop and aborts Nvim.

Solution:
Leave unknown users unexpanded when the system account lookup fails.
2026-07-17 14:21:29 -04:00
Olivia Kinnear
ed5dcc0edf fix(restart): messages EXX error codes #40759 2026-07-17 13:52:56 -04:00
dependabot[bot]
e86c63189b ci: bump github/codeql-action from 4.36.3 to 4.37.0 in the github-actions group across 1 directory (#40755)
ci: bump github/codeql-action

Bumps the github-actions group with 1 update in the / directory: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.36.3 to 4.37.0
- [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.36.3...v4.37.0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-17 12:43:02 -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
Olivia Kinnear
58fe621cfc feat(health): rearrange vim.ui.img checks #40782 2026-07-17 07:09:04 -04:00
Justin M. Keyes
d36d05cbd5 refactor(globals): group Visual-mode globals in VisualState #40777 2026-07-16 20:38:44 -04:00
Justin M. Keyes
4d90288c69 test: unreliable "bumps 'busy' on each watched buffer" #40775 2026-07-16 17:25:28 -04:00
Justin M. Keyes
9bfa337899 Merge #39485 refactor(globals): SearchState 2026-07-16 16:11:36 -04:00
Justin M. Keyes
81926f04b4 refactor(search): SearchState 2026-07-16 21:39:40 +02:00
carladams1299-lab
b80e01e10a refactor(globals): group search state into SearchState struct 2026-07-16 21:35:01 +02:00
Barrett Ruth
9edf57e665 fix(dir): custom 3P directory-browser #40725
Problem:
Third-party directory browsers do not have a documented way to take over local
directory buffers from nvim.dir.

Solution:
Document deleting the nvim.dir augroup and handling FileType directory as the
after-startup handoff, and avoid installing the built-in buffer-local "-" mapping
when "-" is already mapped.
2026-07-16 14:26:01 -04:00
jdrouhard
c15ac3d64c fix(lsp): capability cleanup #40763 2026-07-16 13:08:47 -04:00
Curnic Dorin
a297985d05 fix(messages): show hint in E77 error #40765 2026-07-16 10:23:27 -04:00
zeertzjq
7c091348af test(api/ui_spec): fix flaky test (#40767)
The poke_eventloop() and screen:expect() sometimes don't run the test
runner's event loop long enough for the data to arrive at the reading
end of the pipe. Use a screen:expect_unchanged() so that the event loop
can run a bit longer.

FAILED   ...ovim/build/Xtest_xdg_api/test/functional/api/ui_spec.lua @ 105: nvim_ui_send works with stdout_tty
Expected values to be equal.
Expected:
"\27]11;?\7Hello world"
Actual:
"\27]11;?\7"
stack traceback:
	...ovim/build/Xtest_xdg_api/test/functional/api/ui_spec.lua:138: in function <...ovim/build/Xtest_xdg_api/test/functional/api/ui_spec.lua:105>
2026-07-16 19:36:13 +08:00
Jan Edmund Lazo
16c25e8aee vim-patch:8.2.4955: text property in wrong position after auto-indent (#40766)
Problem:    Text property in wrong position after auto-indent.
Solution:   Adjust text property columns. (closes vim/vim#10422, closes vim/vim#7719)

788c06a249

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2026-07-16 06:48:20 +00:00
Sean Dewar
1741da8412 fix(window): yeet grid later when closing float in other tabpage #40758
Problem: #40731 may still crash if close_buffer autocmds reinsert the float's
grid. Plus removing the grid (and posting win_close) is unneeded if
win_close_othertab refuses to close the window later, which is possible.

Solution: do the stuff before freeing the window, like win_close.
2026-07-15 19:09:54 -04:00
glepnir
5ce9e74f13 feat(completion): commitCharacters #38417
Problem: LSP completion commitCharacters are not handled. Typing a
commit character (e.g. `.`, `(`, `;`) while a completion item is
selected does not accept the item first.

Solution: Store commit characters as a flat string in complete-items.
Check it before completion stops, accept the match and let
the character be inserted normally.
2026-07-15 19:08:37 -04:00
Olivia Kinnear
4f1ef2dec1 fix(restart): keep :restart error message concise #40746 2026-07-15 19:05:46 -04:00
Justin M. Keyes
31ad7d4527 Merge #40621 fix(ui2)!: legacy 'ruler' inconsistencies 2026-07-15 08:13:37 -04:00
phanium
6f370f34f2 fix(window): remove float grid from compositor layers before free #40731
Problem: Closing a floating window from a non-current tab frees its grid
without removing it from the compositor's `layers` table, so the next
`ui_comp_put_grid()` walks a dangling pointer (UAF).

Solution: Call `ui_comp_remove_grid()` (and `ui_call_win_close()` for
multigrid UIs) before `win_free_mem()`, matching `win_close()` since
PR #21551.
2026-07-15 07:48:34 -04:00
jdrouhard
44d5593afd refactor(lsp): unify LspNotify, decor provider for capabilities #40691
Problem: Every LSP capability that sends a request on a document change
to update its state was using its own buffer-local autocmd to do so.
That means there is a separate autocmd per buffer per active
capability/feature, and the actual code inside the autocmd callback was
virtually identical. The same problem occurred for capabilities that had
components to draw on the screen that had their own decoration providers.

Solution: Introduce a central `LspNotify` autocmd and decoration
provider in the capability module itself. New base class methods
`on_close` and `on_change` that take a client_id have been provided, for
`didClose` and `didOpen`/`didChange` notifications respectively. New
base class method `on_win` that takes topline and botline has been
provided to add extmarks or perform other work when lines of a buffer
are being drawn.

The autocmd callback loops through each active capability instance for
the buffer and calls a corresponding method with the triggering
client_id if it is currently attached to the buffer that triggered the
autocmd. The decoration provider just calls on_win for all active
capabilities on the buffer.

This slightly tweaks folding range to make use of these new client-id
specific callbacks.
2026-07-15 07:07:17 -04:00
Robert Muir
4bc30d6e10 fix(lsp): improve inlayHint.resolveSupport in client capabilities #40741
Problem
The current list of properties for inlay hint resolve support includes a
non-existent "location". This field should be "label.location" according
to the specification. Tooltips and commands for inlay hint "parts"
aren't advertised as being resolvable.

Solution
Remove "location" and add "label.location", "label.tooltip", and
"label.command".

Closes #40740
2026-07-15 06:49:45 -04:00
Barrett Ruth
b2570e6852 fix(showcmd): avoid stale %S contents #40747
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2026-07-15 06:10:09 -04:00
Justin M. Keyes
671e9d4913 feat(marks): :marks completion, list extmarks #40743
Problem:
- No UI for listing extmarks.
- `:marks` doesn't support cmdline-completion.

Solution:
- Add completion and extmarks support to `:marks`.
- Update `get_buf_local_marks` to include the ":" (prompt-buffer) mark.
2026-07-15 05:55:51 -04:00
zeertzjq
f17dfc9ab3 test: fix typo (#40750) 2026-07-15 07:55:01 +00:00
zeertzjq
39bc59a8f1 fix(floatwin): don't use same window as altwin (#40748)
Fixes a regression from #34486
Fix #40745
2026-07-15 05:59:45 +00:00