Commit Graph

10587 Commits

Author SHA1 Message Date
Nathan Zeng
a0dcdcd8a0 feat(treesitter): provide select()
Problem: No public method for treesitter incremental selection.

Solution: Add `vim.treesitter.select()`.
2026-05-07 12:03:02 +02:00
Justin M. Keyes
ad27075c8d feat(pos): pos:to_offset(), pos.offset() (#39639)
Problem:
For a given position, it is not easy to compare which of several other positions is closest to it.

Solution:
Add support for converting `vim.Pos` to a buffer byte offset.

This allows for sorting, e.g:
```lua
table.sort(positions, function(pos1, pos2)
  return pos1:to_offset() < pos2:to_offset()
end
```

Or a binary search, e.g:
```lua
vim.list.bisect(positions, pos, { key = function(pos) return pos:to_offset() end })
```

Co-authored-by: Yi Ming <ofseed@foxmail.com>
2026-05-07 05:16:53 -04:00
Justin M. Keyes
0197461265 backport fix(diagnostic): status() respects config.signs (#39601)
Problem:
`diagnostic.status` only follows the `config.status.format` setting to determine how to display diagnostic signs. However, `signs` can actually also be configured via `config.signs.text`.

Solution:
If the user has set symbols via `config.status.format`, let that determine the content of `signs`; otherwise, use `config.signs.text` for display.

TODO: drop support `type(config.status.format) == 'table'`; users should just configure `config.signs.text` directly.

Co-authored-by: Yi Ming <ofseed@foxmail.com>
2026-05-06 16:42:02 +00:00
Tomasz N
70f22713a1 fix(ui2): entering the pager fails if <ESC> is remapped to :fclose (#39462)
Problem:  Entering the pager fails if <ESC> is remapped to :fclose by user.
Solution: Avoid executing mappings with nvim_feedkeys() that closes expanded cmdline.
(cherry picked from commit 2b7a00746d)
2026-05-06 13:58:25 +00:00
STG
13041a067e fix(ui2): error E518 when typing "vim:" in cmdline #39599
Problem: `vim:`, etc. in cmdline are interpreted as modeline, causing error E518.

Solution: Set 'nomodeline' when creating the buffers.
(cherry picked from commit 0ea720f281)
2026-05-06 13:31:37 +00:00
zeertzjq
15a58bb02a vim-patch:9.2.0444: Cannot set 'path' option via modeline
Problem:  Cannot set 'path' option via modeline (zeertzjq, after v9.2.0435)
Solution: Revert the part that disallows setting 'path' via modeline.

closes: vim/vim#20137

88fb739918

Co-authored-by: Christian Brabandt <cb@256bit.org>
(cherry picked from commit d1c3d6fbaa)
2026-05-06 00:54:27 +00:00
zeertzjq
b013940391 vim-patch:9.2.0435: [security]: backticks in 'path' may cause shell execution on completion
Problem:  [security]: Backticks enclosed shell commands in the 'path'
          option value are executed during completion (q1uf3ng).
Solution: Skip path entries containing backticks, add P_SECURE to 'path'
          option, so that it cannot be set from a modeline (for symmetry with
          the 'cdpath' option)

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-hwg5-3cxw-wvvg

Supported by AI.

190cb3c2b9

Co-authored-by: Christian Brabandt <cb@256bit.org>
(cherry picked from commit b06f8b174f)
2026-05-06 00:54:27 +00:00
Yi Ming
e67f9c5853 fix(lua): avoid __index when deciding if a table is a list #39556
Problem:
When a table has `__index`, `vim.islist` is unreliable.

Solution:
Index using `rawget`.

(cherry picked from commit 264fbc0ace)
2026-05-05 20:54:41 +00:00
David Balatero
4f22640b86 fix(treesitter): get_node_text() inconsistent trailing newline #39409
Problem:
`get_node_text()` returned inconsistent results between buffer and
string sources when a node's range ends at `end_col == 0` (i.e. the node
ends with a newline). The buffer path dropped the trailing newline; the
string path included it correctly.

Solution:
Append `'\n'` in `buf_range_get_text()` when `end_col == 0` and
`start_row ~= end_row`. The `start_row ~= end_row` guard excludes
zero-width nodes at column 0, which should return `""`.

Remove the workaround in the `#trim!` directive that manually
compensated for the missing newline.

Strip whitespace in `resolve_lang()` so injection language nodes ending
at `end_col == 0` (e.g. `">lua\n"`) still resolve correctly.

(cherry picked from commit 7ed5609439)
2026-05-03 13:53:04 +00:00
Tristan Knight
8919b02eba fix(lsp): dynamic registration for off-spec method #39544
Problem:
LSP clients previously did not handle dynamic registration for off-spec methods

Solution:
Update the client logic to assume support for dynamic registration when
the method is unknown. Adjust the registration provider fallback and
enhance tests to verify correct behaviour for unknown methods and their
registration options. This improves compatibility with servers using
custom dynamic registrations.

AI-assisted: OpenCode
(cherry picked from commit 344d984ed2)
2026-05-02 10:54:42 +08:00
Yochem van Rosmalen
e069022215 fix(help): fix CTRL character issue for :help {subject} #39537
Problem:
The argument to `:help` is normalized to fit the general tag format.
I.e. i^U-default, iCTRL-U-default and i_CTRL_U-default should all point
to the i_CTRL_U-default tag. Our normalization adds an underscore around
the CTRL keycode, e.g. iCTRL-GCTRL-J becomes i_CTRL-G_CTRL-J. That's not
necessary if the following part starts with a dash, like the case of
iCTRL-U-default.

Solution:
Do not insert an underscore if the following character is a dash/minus
(-).

(cherry picked from commit 84ae70c172)
2026-05-01 10:50:35 +00:00
Matthew Hughes
20a2398877 docs: Update instructions for debugging LSP (#39527)
docs: update instructions for debugging LSP

Previously, it was suggested to set:

    vim.lsp.log.set_format_func(vim.inspect)

This made sense before f72c13341a, when
`format_func` was called once per argument being logged, but since that
commit it's called with the log level followed by the other args, so the
suggested setting would call `vim.inspect(log_level, ....)` which would
just print the human readable name of the current log level and no other
details, for example with this set I saw in my logs:

    "DEBUG""DEBUG""DEBUG""DEBUG"

Instead just rely on the default formatter, which will:

> ... log the level, date, source and line number of the
caller, followed by the arguments.

(cherry picked from commit 578727c25e)
2026-04-30 22:05:37 +00:00
Justin M. Keyes
4b424a06c5 backport fix(lsp): send didClose, didOpen when languageId changes (#39519)
fix(lsp): send didClose, didOpen when languageId changes

Problem:
If a buffer's filetype changes after the LSP client has already
attached (e.g. from json to jsonc via a modeline), but the client
supports both filetypes, it stays attached. It does not notify the
server of the new languageId, causing the server to incorrectly process
the file using the old languageId.

Solution:
Save the languageId used during textDocument/didOpen, and send
textDocument/didClose + textDocument/didOpen when buffer's languageId
changed.

Lsp spec:
0003fb53f1/_specifications/lsp/3.18/textDocument/didOpen.md (L5)
> If the language id of a document changes, the client
> needs to send a textDocument/didClose to the server followed by a
> textDocument/didOpen with the new language id if the server handles
> the new language id as well.

AI-assisted: Gemini 3.1 Pro

Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
2026-04-30 13:09:55 +00:00
Justin M. Keyes
4ee47a56ec docs: misc 2026-04-30 02:08:19 +02:00
Till Bungert
822778f7e5 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-29 23:41:41 +02:00
Olivia Kinnear
c9ca59ad28 backport: fix(lsp): util.lua attempt to concatenate userdata #39510
Problem:
Error when querying document symbols using python-lsp-server:

    lsp/util.lua:1955: attempt to concatenate field 'containerName' (a userdata value)

Solution:
Check for `vim.NIL`.

(cherry picked from commit 1799aaebda)
2026-04-29 16:13:47 -04:00
neovim-backports[bot]
378f5f49b3 backport: fix(lsp): show meaningful error on invalid completion response (#39476)
Problem: vim.NIL is truthy in Lua, so `#(result.items or result)`
crashes on `#vim.NIL` when servers return null.

Solution: skip spec-allowed result=null silently, raise an error
on items=null with the server name.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_completion
(cherry picked from commit b9431b340f)

Co-authored-by: glepnir <glephunter@gmail.com>
2026-04-28 11:27:50 -04:00
neovim-backports[bot]
24a4bf20c0 backport: fix(termdebug): fix evaluate display with gdb pretty print (#39475)
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]
(cherry picked from commit c06e3d6f81)

Co-authored-by: Matthew Hughes <matthewhughes934@gmail.com>
2026-04-28 11:25:53 -04:00
Yi Ming
96d5dd4107 perf(vim.pos): use numeric index internally #39447
(cherry picked from commit d40875a2f8)
2026-04-27 18:26:02 +00:00
Justin M. Keyes
d735ce36ec docs: sort quasi-keysets 2026-04-26 22:02:34 +02:00
Justin M. Keyes
534b1a8e7e docs: vim.ui.select, misc
(cherry picked from commit d960ae6760)
2026-04-26 19:45:57 +00:00
Justin M. Keyes
e77e260d36 docs: lsp.CodeActionContext, nested @inlinedoc
- fix https://github.com/neovim/neovim/issues/39208
- fix generation of neste `@inlinedoc` classes

(cherry picked from commit 825bfba789)
2026-04-26 19:45:57 +00:00
Luis Calle
2ec758f403 fix(vim.range): validate arguments on all cases #39415 2026-04-26 12:41:06 +02:00
Luis Calle
49efe692f3 feat(vim.pos): accept buf=0 for current buf #39414 2026-04-26 12:41:06 +02:00
Yi Ming
828a35b14f feat(docs): render class dot members as module functions
AI-assisted: Codex
2026-04-26 12:39:45 +02:00
Yi Ming
b6ccf44aef revert: "docs: vim.range, vim.pos #38869"
This reverts commit c530fd8e75.
2026-04-26 12:39:45 +02:00
Justin M. Keyes
26678ebbd8 backport: docs: misc (#39395) 2026-04-25 13:51:22 -04:00
neovim-backports[bot]
cf17575b7b backport: docs(vim.ui): document an interface for vim.ui.select preview (#39401)
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.
(cherry picked from commit c44df255aa)

Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2026-04-25 13:48:07 -04:00
Yi Ming
5e6c8d4edf 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`.

(cherry picked from commit 775c7d1b53)
2026-04-25 16:55:31 +00:00
Tristan Knight
aedbae4ab6 fix(lsp): handle self-mapped methods in supports_method #39383
Problem:
The LSP client incorrectly checks for server capabilities when determining
support for self-mapped methods (e.g., 'shutdown'), which do not have
corresponding capabilities in the server's response. This leads to false
negatives when checking if such methods are supported.
This was handled correctly for dynamic registrations, but not for static.

Methods such as 'shutdown', do not have a related server capability and should
be assumed to be supported.

Solution:
Update the `supports_method` logic to always return true for self-mapped
methods.

(cherry picked from commit f83d0b9653)
2026-04-24 23:19:16 +00:00
Barrett Ruth
654c964d1a fix(trust): hash unchanged empty buffers as empty files #39027
Problem:
`vim.secure.trust()` hashes an unchanged empty buffer as
a newline, so trusting an empty file by buffer never works.

Solution:
Hash unchanged empty-buffers `''` so buffer-based
trust matches the on-disk empty file.

(cherry picked from commit 0a8218a2b4)
2026-04-23 23:38:56 +00:00
neovim-backports[bot]
0bd6e62509 fix(lsp): malformed edit if apply_text_edits() is called twice (#39347)
Problem:
Use vim.lsp.util.apply_text_edits to re-apply the same textedit causes
an incorrect edit, because apply_text_edits silently modifies the
parameter.

Solution:
- Avoid changing `text_edit._index`.
- Document this fun feature.

Helped-by: Riley Bruins <ribru17@hotmail.com>
Helped-by: Yi Ming <ofseed@foxmail.com>

(cherry picked from commit 790a8be5f3)

Co-authored-by: geril07 <62308020+geril07@users.noreply.github.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-04-23 19:24:04 -04:00
Barrett Ruth
c4d3a3d363 fix(lsp): filter code_action diagnostics to the cursor #38988
Problem:
Cursor-position `vim.lsp.buf.code_action()` requests include all diagnostics on the current line, so unrelated same-line diagnostics affect the returned actions.

Solution:
Filter same-line diagnostics to the cursor position for cursor-position requests.

(cherry picked from commit ecb8402197)
2026-04-23 23:07:26 +00:00
Ashley Hauck
93dc301781 fix(lsp): callHierarchy/outgoingCalls ranges are relative to caller, not callee #39336
Problem:
The fromRanges field of the result of callHierarchy/outgoingCalls is
documented as being relative to the caller. Using
vim.lsp.buf.outgoing_calls() opened the qflist with an entry with the
callee's filename, but the caller's line number.

Solution:
Open the qflist with the callers file (the bufnr from the request),
rather than the callees (the uri from the resulting CallHierarchyItem)

(cherry picked from commit 7e006b06c4)
2026-04-23 23:07:07 +00:00
atusy
27d01f2dbb fix(lsp): handle null id in JSON-RPC responses
Problem:
LSP spec allows response message to have a null request-id.
This may happen when for example client sends unparseable request.
https://github.com/microsoft/language-server-protocol/issues/196

Solution:
Guard the server response branches against id=vim.NIL (json null),
and handle error responses with null id by logging a warning
and dispatching on error.

Problem:
CI (ubuntu asan, ubuntu tsan, windows) reports `uv_loop_close()
hang?` from the two new null-id response tests. The leaked
handle is the server-side accepted TCP socket created inside
`server:listen` callback. The tests closed only the listener
but not the accepted socket, so libuv could not finish shutting
down the loop and each test session took ~2s extra to exit.

Solution:
Hoist the accepted socket to the outer `exec_lua` scope and
close it at teardown before closing the listener. The close
runs synchronously inside `exec_lua`, so the loop has time to
dispose the handle before the session exits.

* test(lsp): close accepted socket on read-loop exit/error

Match the precedent in the handler test ("handler can return
false as response") and the shared `_create_tcp_server` helper
in `test/functional/plugin/lsp/testutil.lua`: close the
accepted socket from inside the `create_read_loop` exit/error
callbacks. The teardown close added in the previous commit
remains as belt-and-suspenders, so the socket is disposed
whether the server goes away first or the client does.
2026-04-23 23:00:25 +02:00
Evgeni Chasnovski
dd95e434e3 fix(pack): only use tags that strictly comply with semver spec #39342
Problem: Using `version=vim.version.range(...)` in plugin specification
  is meant to use semver-like tags. Whether a tag is semver-like was
  decided by a plain `vim.version.parse` which is not strict by default.
  This allowed treating tags like `nvim-0.6` (which is usually reserved
  for the latest revision compatible with Nvim<=0.6 version) like semver
  tags and resulted in confusing behavior (preferring `nvim-0.6` tag
  over `v0.2.2`, for example).

Solution: Use `vim.version.range(x, { strict = true })` to decide if the
  tag name is semver-like or not. This allows tags like both `v1.2.3`
  and `1.2.3` while being consistent in what Nvim thinks is a semver
  string.

  This is technically not a breaking change since it was documented that
  only tags like `v<major>.<minor>.<patch>` will be recognized as
  semver.

(cherry picked from commit f8c94bb8cf)
2026-04-23 15:55:14 +00:00
Justin M. Keyes
14eea10ec5 ci: drop cirrus #39321
Problem:
cirrus will shutdown soon, and we are running out of minutes anyway,
which causes ci failures.

Solution:
Drop cirrus config.

(cherry picked from commit 82198d0a66)
2026-04-22 23:01:00 +00:00
Justin M. Keyes
b46688feee backport feat(treesitter): expand selection to sibling node (#39323)
Problem:
Can't expand treesitter-incremental-selection to the next and previous
sibling nodes.

Solution:
Pressing `]N` in visual mode will expand the selection to the next
sibling node, and `[N` will do the same with the previous node.

Co-authored-by: altermo <107814000+altermo@users.noreply.github.com>
2026-04-22 21:40:12 +00:00
Justin M. Keyes
fd1b193d51 feat(:restart): v:starttime, v:exitreason #39319 2026-04-22 18:58:47 +00:00
Justin M. Keyes
4b35336f6f NVIM v0.12.2
Following is a list of commits (fixes/features only) in this release.
See `:help news` in Nvim for release notes.

BREAKING
--------------------------------------------------------------------------------
- c76bbd0a54 diagnostics: restore `is_pull` namespace argument #38698
- 0a3add979a vim.pos: require `buf` param on vim.pos, vim.range #38665

REVERTED CHANGES
--------------------------------------------------------------------------------
- 5920a1d07f "fix(lsp): only resolve LSP configs once" #38990

BUILD
--------------------------------------------------------------------------------
- 26bcffda6c gen_char_blob.lua: "bad argument to format" if path contains "%" #39274

FEATURES
--------------------------------------------------------------------------------
- e767b4843b editor: ZR performs :restart #38967
- 6b86f5520d connect: filepath completion #38959
- ceaa8b648a filetype: `vim.filetype.inspect()` returns copy of registry
- 78234f2d54 vim.version: add __eq to vim.VersionRange #38881

FIXES
--------------------------------------------------------------------------------
- a7214c0719 don't make path empty when truncating trailing slashes (#38844)
- b3b5674ac7 :restart: --listen reusage on windows #39281
- 3e0ece4cde :restart: avoid ERR/WRN logging on Windows with --listen (#39287)
- eaa8cff0bd api: expose fg_indexed/bg_indexed in nvim_get_hl (#39240)
- 8669e34bba api: nvim_clear_autocmds() "event" type check
- 4053141cb3 api: nvim_get_hl drops groups defined with link_global #38492
- 319c031820 channel: fix Ctrl-C handling regression in terminal
- ba3de79ccb cmd: ++p, ++edit should match "word" boundary #39146
- c6c348471d cmdline: 'inccommand' preview after setcmdline() #38795
- 9e1c542b55 cmdline: avoid 'incsearch' recursion after redraw #39303
- 4a18c05f87 cmdline: avoid Ex-mode NULL cmdline_block event #39043
- e4dc08da1a completion: update CursorColumn during completion (#39159)
- 25170ca02d diagnostic: virtual_lines should anchor at end_lnum, not lnum #38701
- 6cb5012e36 difftool: ensure standardized locale for diff output parsing #38853
- 9966afbc9d drawline: hang while redrawing diff filler above fold #39219
- 1ebb9b16d2 eval: crash on some NULL ptr deref #39182
- 6ae6cf5d61 float: don't unload 'hidden' float buffer with :close! (#39304)
- d86d9759e5 gf: handle local `file:` URI paths #38915
- 11a4a0077c health: recognize Zig build optimization levels #38804
- 36bade7efb highlight: preserve inherited colors when update=true breaks links #38750
- 7ffee0dfbf lsp: apply_text_edits causes unwanted BufDelete events #38778
- df726644b8 lsp: check filetype registry in health (#38885)
- 18b1ff81a3 lsp: check stale context in hover/signature callback #38724
- fe09c71c34 lsp: send didOpen on save to all clients+groups #37454
- 34cbfeca9c lsp: show CompletionItem.detail in info popup #38904
- 6250019537 lsp: show_document can't position cursor past EOL in insert-mode #38566
- 5907307662 lsp: skip codelens refresh redraw for deleted buffer #39193
- 9aadbed770 lua: make `vim._with()` work with `buf=0` and `win=0` context #39151
- 0039785724 lua: make vim.deep_equal cycle-safe
- 53038d2c38 lua: not obvious which _meta/ files are generated #39035
- f2a5c90cbc marks: adjust marks when unloading "nofile" buffer #39118
- a358b9be64 message: flush messages before "empty" msg_show #38854
- 1b36b75832 messages: truncate warning messages only in display (#38901)
- f7e3cf127c move: avoid integer overflow with large 'scrolloff' (#39251)
- 452a9b895c normal: pass count to 'keywordprg' as arg1 #38965
- 4d4e196447 options: default 'titlestring' shows CWD #39233
- 6583833ee2 pack: GIT_DIR/GIT_WORK_TREE env vars may interfere #39279
- df3d7e36d0 pack: make 'stash' call compatible with older Git #38679
- 1a5d41a48f pack: more advice for out-of-sync lockfile #38931
- ca0e3818c0 pum: crash with 'pumborder' and wide item (#38852)
- 38be4475c6 pum: info float width grows on reselect with 'linebreak' #38680
- eee2d10fd2 rpc: trigger UILeave earlier on channel close (#38846)
- 898ccbc68a smoothscroll: crash when resizing to textoff with showbreak
- 5ac95da8ea statusline: no window-local highlights for last line 'ruler' #38879
- ffb0ebb752 substitute: don't crash with very large count (#39272)
- abcc5342ee terminal: do not reflow altscreen on resize #39024
- d3ef77639a terminal: forward streamed bracketed paste properly (#39152)
- 111c7f434e treesitter: TSNode:id() with NUL byte causes unreliable select()  #39134
- 2ea9ed32e4 treesitter: restore highlighting on 32 bit systems #39091
- c294bc397b tui: check background color on resume
- b08c289a45 ui2: dialog paging is inconsistent #39128
- c6b5eb30de ui2: don't dismiss expanded messages for non-typed key #39247
- c6578ea28b vim.filetype: match() fails if g:ft_ignore_pat is not defined #39158
- a15e27fbcf vim.pos: Range:intersect() drops `buf` #38898

VIM PATCHES
--------------------------------------------------------------------------------
- 27214645f6 450895d: runtime(make): fix wrong highlighting with $ inside double quotes (#39177)
- 891c6c9150 8.2.2440: documentation based on patches is outdated (#39144)
- e203257fff 9.2.0331: spellfile: stack buffer overflows in spell file generation (#38948)
- 8ba79b4601 9.2.0345: Wrong autoformatting with 'autocomplete' (#39060)
- 9c11229832 9.2.0357: [security]: command injection via backticks in tag files (#39102)
- 5153006747 9.2.0364: tests: test_smoothscroll_textoff_showbreak() fails
- 187a34d59b 9.2.0380: completion: a few issues in completion code (#39264)
- 15d824e5d6 9.2.0385: Integer overflow with "ze" and large 'sidescrolloff' (#39289)
- 19a54ad964 e666597: runtime(doc): make window option description a bit less vague (#39173)
- d672f0f494 partial:9.2.0348: potential buffer underrun when setting statusline like option (#39063)

OTHER
--------------------------------------------------------------------------------
- ed47b27ad4 feat(api): rename buffer to buf (#38899)
- 570d8fd128 feat(api): rename buffer to buf in retval #39015
- 15991abaa7 feat(events): trigger MarkSet autocmd in :delmarks (#39218)
- b6a3ad3979 fix(ui2): ensure msg window is visible after closing tab (#39245)
- 099489b985 refactor: update usages of deprecated "buffer" param #39090
- 55d3d1bbeb test(lsp): extract buf/util parts from lsp_spec.lua (#39170)
2026-04-22 16:05:55 +02:00
neovim-backports[bot]
b6a3ad3979 backport: fix(ui2): ensure msg window is visible after closing tab (#39245)
fix(ui2): ensure msg window is visible after closing tab

Problem:  After closing a tabpage while the msg window is showing a
          message, it is hidden while the msg window still contains a
          message.
Solution: Unhide the msg window after entering a tabpage and it still
          contains a message.


(cherry picked from commit 607fcfb37a)

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
Co-authored-by: Linykq <yukunlin590@gmail.com>
2026-04-22 13:43:04 +00:00
neovim-backports[bot]
eebd98fd99 docs(quickfix): quickfix window location (#39305)
Problem:  Documentation for quickfix window location is outdated (since 6256adde).
Solution: Update quickfix.txt.
(cherry picked from commit 2ca31eddae)

Co-authored-by: luukvbaal <luukvbaal@gmail.com>
2026-04-22 08:17:13 -04:00
zeertzjq
3e0ece4cde fix(:restart): avoid ERR/WRN logging on Windows with --listen (#39287)
Problem:  :restart leads to ERR/WRN logging on Windows with --listen.
Solution: Add a log_level flag to vim._with() and use it to suppress
          logging from serverstart()/serverstop() during restart.
(cherry picked from commit 208951cbc0)
2026-04-22 12:04:36 +00:00
Nick Krichevsky
4d4e196447 fix(options): default 'titlestring' shows CWD #39233
Problem:
In the default 'titlestring', if the containing directory is the CWD, it renders as "."

Solution:
Add `:p` to the titlestring.

(cherry picked from commit e68e769352)
2026-04-22 11:52:02 +00:00
neovim-backports[bot]
b3b5674ac7 fix(:restart): --listen reusage on windows #39281
Problem:
On Windows, :restart cannot immediately reuse the canonical --listen
address because named pipe release is asynchronous.

Solution:
Start the new Nvim server on a temporary address; in the new Nvim,
retry serverstart() with the original ("canonical") address until it
succeeds.

(cherry picked from commit 5891f2f3dc)

Co-authored-by: Sanzhar Kuandyk <92693103+SanzharKuandyk@users.noreply.github.com>
2026-04-22 06:22:12 -04:00
fleesk
6583833ee2 fix(pack): GIT_DIR/GIT_WORK_TREE env vars may interfere #39279
Problem:
With GIT_DIR/GIT_WORK_TREE set, the LSP on the vim.pack.update()
confirmation buffer does not show the correct git log on hover.

Solution:
Temporarily remove the git vars from the environment.

(cherry picked from commit e53e728c92)
2026-04-22 09:24:45 +00:00
Justin M. Keyes
e767b4843b backport: refactor(test): drop deprecated exc_exec #39255 2026-04-21 16:22:05 +00:00
luukvbaal
c6b5eb30de fix(ui2): don't dismiss expanded messages for non-typed key #39247
Problem:  Invalid check for non-typed key to dismiss expanded cmdline.
          Unable to delay the timer that removes a message from the msg
          window.
Solution: Check for empty string instead of nil to determine whether a
          key is typed.
          Restart the timer if it expires while the user is in the msg
          window. Allow entering the msg window with a mouse click.
(cherry picked from commit faa7c15b5a)
2026-04-20 19:13:17 +00:00
Justin M. Keyes
5ad64af44f docs: misc #39243 2026-04-20 11:46:26 +00:00
Justin M. Keyes
eaa8cff0bd fix(api): expose fg_indexed/bg_indexed in nvim_get_hl (#39240)
Problem: fg_indexed/bg_indexed were dropped from nvim_get_hl output due
to a wrong short_keys guard. HL_FG_INDEXED also wasn't cleared in
hl_blend_attrs, and HLATTRS_DICT_SIZE was too small.

Solution: Remove the short_keys guard, clear HL_FG_INDEXED in
hl_blend_attrs, bump HLATTRS_DICT_SIZE to 24, and clarify docs that
these flags mean rgb is an approximation of the cterm palette index.

(cherry picked from commit 01861c2f95)

Co-authored-by: glepnir <glephunter@gmail.com>
2026-04-20 09:46:55 +00:00