summaryrefslogtreecommitdiffstatshomepage
AgeCommit message (Collapse)AuthorFiles
2026-04-25fix(channel): stack-buffer-overflow with exit during connection (#39387)release-0.12zeertzjq3
Problem: When Nvim exits while connecting to a socket it leads to stack-buffer-overflow. Solution: Associate the handle with the Stream and use the Stream's internal_close_cb to update the "closed" status. (cherry picked from commit 4ed2e66d2ec20c2bf0325283b0e785ca3abb15c0)
2026-04-25test: add finally() to meta file (#39388)zeertzjq1
(cherry picked from commit df8cf0ed25467856b58b44352cb6aad504baf1aa)
2026-04-24fix(lsp): handle self-mapped methods in supports_method #39383Tristan Knight2
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 f83d0b9653a8a548093645a9397f9f293b91c127)
2026-04-24backport: fix(api): leak `preview` callback `LuaRef` in ↵neovim-backports[bot]2
`nvim_create_user_command` (#39377) Problem: Invalid `nvim_create_user_command` calls can leak the `preview` callback reference after Neovim has taken ownership of it. 1. build with {a,l}san 2. run: ```sh <path/to/nvim> --headless -u NONE --clean +'lua for i = 1, 100 do pcall(vim.api.nvim_create_user_command, "some very epic stuff" .. i, {}, -- NOTE: this is INVALID (not a function or string) { preview = function() end }) end vim.cmd("qa!") ' +qa ``` 3. see: ``` 100 lua references were leaked! ``` Solution: Clear `preview_luaref` in `err:`. (cherry picked from commit 393f687503a319a6f521e8335b4dd8030e3ea67b) Co-authored-by: Barrett Ruth <62671086+barrettruth@users.noreply.github.com>
2026-04-24backport: fix(api): `LuaRef` leak in `nvim_set_keymap` on LHS too long (>=66 ↵neovim-backports[bot]2
bytes) (#39376) Problem: `nvim_set_keymap` leaks the `callback` `LuaRef` when the LHS is too long. Solution: Make `set_maparg_lhs_rhs` transfer `rhs_lua` to `MapArguments` up front so the caller always owns the ref. (cherry picked from commit 58aad59e1cf89e2bee0fc2e02c42506d2b1feeaf) Co-authored-by: Barrett Ruth <62671086+barrettruth@users.noreply.github.com>
2026-04-24Merge pull request #39371 from justinmk/releaseJustin M. Keyes3
backport test: curbuf initialized in describe-block
2026-04-24test: fix merge conflictJustin M. Keyes2
2026-04-24test: curbuf initialized in describe-blockglepnir1
Problem: curbuf was initialized at describe-block load time before any Nvim session existed. Solution: Replace with 0 directly at call sites.
2026-04-23fix(trust): hash unchanged empty buffers as empty files #39027Barrett Ruth3
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 0a8218a2b40fa8f6b533605db4377ff89250711c)
2026-04-23fix(lsp): malformed edit if apply_text_edits() is called twice (#39347)neovim-backports[bot]2
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 790a8be5f306a28ca8e96c2ae3fa3b465ae3718f) Co-authored-by: geril07 <62308020+geril07@users.noreply.github.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-04-23fix(lsp): filter code_action diagnostics to the cursor #38988Barrett Ruth2
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 ecb8402197f1883feec1c7a9f9d02a39912ae04a)
2026-04-23fix(lsp): callHierarchy/outgoingCalls ranges are relative to caller, not ↵Ashley Hauck2
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 7e006b06c4db1464be9c4e2826774fe6f0a4f880)
2026-04-23fix(terminal): memory leak in pending TermRequest StringBuilder #39333Barrett Ruth2
Problem: Destroying a terminal with pending `TermRequest` events leaks memory. Solution: Make `emit_termrequest` the sole owner of its `pending_send` allocation. (cherry picked from commit 19ef632decf7e5d3d9bb70f347c88b92c138b45e)
2026-04-23Merge pull request #39356 from justinmk/releaseJustin M. Keyes4
backports
2026-04-23refactor(test): deduplicate trust testsJustin M. Keyes2
2026-04-23fix(lsp): handle null id in JSON-RPC responsesatusy2
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-23fix(lua): don't strip debuginfo in precompile module #39191phanium5
Problem: debug.getinfo on bytecode module/func don't give you detail source info. Solution: - Use `loadstring`+`string.dump` to replace LUAC_PRG(`luac`/`luajit -b`) - `string.dump(…,false)` to generate non-strip version bytecode - `loadstring(…,fname)` to specify the full source name BEFORE: $ nvim --clean +'=debug.getinfo(vim.fn.maparg("]<Space>", "n", 0, 1).callback, "Sl")' --headless +q { currentline = -1, lastlinedefined = 456, linedefined = 452, short_src = "?", source = "=?", what = "Lua" } AFTER: $ nvim --clean +'=debug.getinfo(vim.fn.maparg("]<Space>", "n", 0, 1).callback, "Sl")' --headless +q { currentline = -1, lastlinedefined = 456, linedefined = 452, short_src = "/home/xx/b/neovim/runtime/lua/vim/_core/defaults.lua", source = "@/home/xx/b/neovim/runtime/lua/vim/_core/defaults.lua", what = "Lua" } (cherry picked from commit 398f2c108d8ee3ce7ac950b60520a9569b63da67)
2026-04-23fix(pack): only use tags that strictly comply with semver spec #39342Evgeni Chasnovski3
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 f8c94bb8cf470ff875ac6dc2e962cfb4b9cef0c2)
2026-04-23vim-patch:partial:9.2.0315: missing bound-checks (#39334)zeertzjq4
Problem: missing bound-checks Solution: Add defensive guards against potential buffer overflow (Yasuhiro Matsumoto) Add bounds checking and integer overflow guards across multiple files as a defensive measure. While these code paths are unlikely to be exploitable in practice, the guards prevent undefined behavior in edge cases. - libvterm/vterm.c: use heap tmpbuffer instead of stack buffer in vsprintf() fallback path - channel.c: validate len in channel_consume() before mch_memmove() - spell.c: use long instead of int for addlen to avoid signed overflow in size_t subtraction - alloc.c: add SIZE_MAX overflow check in ga_grow_inner() before itemsize multiplication - list.c: add overflow check before count * sizeof(listitem_T) - popupwin.c: add overflow check before width * height allocation - insexpand.c: add overflow check before compl_num_bests multiplication - regexp_bt.c: replace sprintf() with vim_snprintf() in regprop() - spellfile.c: use SIZE_MAX instead of LONG_MAX for allocation overflow check closes: vim/vim#19904 https://github.com/vim/vim/commit/8d23fcb603d8f8938ce0023086326a5db6780ea2 Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> (cherry picked from commit a4ad469fb1f935aed6f84cfa9e663ab4f7ca1e02)
2026-04-22ci: drop cirrus #39321Justin M. Keyes11
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 82198d0a6622c750b0b86b721998b00ccf3e2b23)
2026-04-22backport feat(treesitter): expand selection to sibling node (#39323)Justin M. Keyes5
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-22feat(:restart): v:starttime, v:exitreason #39319Justin M. Keyes16
2026-04-22feat(eval): treat Lua string as "blob" in writefile() #39098Barrett Ruth3
Problem: vim.fn.writefile() treats Lua strings as Vimscript strings instead of a "binary clean" string. Solution: Treat Lua-originated strings as blob data. (cherry picked from commit fb6aeaba2d3a38c7febd0a39cabd89685de11b9d)
2026-04-22fix(shada): bdelete'd buffers not stored in oldfiles #39070glepnir2
Problem: b98eefd added `!b_p_bl` to `ignore_buf()`, which also skips bdelete'd buffers since bdelete unsets `b_p_bl`. Solution: Check `b_p_initialized` together with `b_p_bl` so that bdelete'd buffers (which have b_p_initialized=false) are not filtered out. Keep `b_p_bl` check only in `shada_get_buflist()`. (cherry picked from commit 496374e9513a5cbd0fd37fbd95d07d6306fa432d)
2026-04-22build: version bumpJustin M. Keyes1
2026-04-22NVIM v0.12.2v0.12.2stableJustin M. Keyes2
Following is a list of commits (fixes/features only) in this release. See `:help news` in Nvim for release notes. BREAKING -------------------------------------------------------------------------------- - c76bbd0a54d2 diagnostics: restore `is_pull` namespace argument #38698 - 0a3add979a26 vim.pos: require `buf` param on vim.pos, vim.range #38665 REVERTED CHANGES -------------------------------------------------------------------------------- - 5920a1d07f79 "fix(lsp): only resolve LSP configs once" #38990 BUILD -------------------------------------------------------------------------------- - 26bcffda6c81 gen_char_blob.lua: "bad argument to format" if path contains "%" #39274 FEATURES -------------------------------------------------------------------------------- - e767b4843b23 editor: ZR performs :restart #38967 - 6b86f5520de9 connect: filepath completion #38959 - ceaa8b648a8e filetype: `vim.filetype.inspect()` returns copy of registry - 78234f2d5474 vim.version: add __eq to vim.VersionRange #38881 FIXES -------------------------------------------------------------------------------- - a7214c07192a don't make path empty when truncating trailing slashes (#38844) - b3b5674ac7d6 :restart: --listen reusage on windows #39281 - 3e0ece4cdefc :restart: avoid ERR/WRN logging on Windows with --listen (#39287) - eaa8cff0bd40 api: expose fg_indexed/bg_indexed in nvim_get_hl (#39240) - 8669e34bbaa2 api: nvim_clear_autocmds() "event" type check - 4053141cb311 api: nvim_get_hl drops groups defined with link_global #38492 - 319c0318209e channel: fix Ctrl-C handling regression in terminal - ba3de79ccbde cmd: ++p, ++edit should match "word" boundary #39146 - c6c348471d0e cmdline: 'inccommand' preview after setcmdline() #38795 - 9e1c542b558d cmdline: avoid 'incsearch' recursion after redraw #39303 - 4a18c05f87f8 cmdline: avoid Ex-mode NULL cmdline_block event #39043 - e4dc08da1a85 completion: update CursorColumn during completion (#39159) - 25170ca02d94 diagnostic: virtual_lines should anchor at end_lnum, not lnum #38701 - 6cb5012e36cd difftool: ensure standardized locale for diff output parsing #38853 - 9966afbc9df4 drawline: hang while redrawing diff filler above fold #39219 - 1ebb9b16d2f9 eval: crash on some NULL ptr deref #39182 - 6ae6cf5d6197 float: don't unload 'hidden' float buffer with :close! (#39304) - d86d9759e531 gf: handle local `file:` URI paths #38915 - 11a4a0077c3e health: recognize Zig build optimization levels #38804 - 36bade7efbc9 highlight: preserve inherited colors when update=true breaks links #38750 - 7ffee0dfbfd1 lsp: apply_text_edits causes unwanted BufDelete events #38778 - df726644b8e4 lsp: check filetype registry in health (#38885) - 18b1ff81a343 lsp: check stale context in hover/signature callback #38724 - fe09c71c34c7 lsp: send didOpen on save to all clients+groups #37454 - 34cbfeca9c28 lsp: show CompletionItem.detail in info popup #38904 - 62500195374a lsp: show_document can't position cursor past EOL in insert-mode #38566 - 590730766270 lsp: skip codelens refresh redraw for deleted buffer #39193 - 9aadbed770b4 lua: make `vim._with()` work with `buf=0` and `win=0` context #39151 - 0039785724a4 lua: make vim.deep_equal cycle-safe - 53038d2c381e lua: not obvious which _meta/ files are generated #39035 - f2a5c90cbc2a marks: adjust marks when unloading "nofile" buffer #39118 - a358b9be6417 message: flush messages before "empty" msg_show #38854 - 1b36b7583231 messages: truncate warning messages only in display (#38901) - f7e3cf127c36 move: avoid integer overflow with large 'scrolloff' (#39251) - 452a9b895c05 normal: pass count to 'keywordprg' as arg1 #38965 - 4d4e19644748 options: default 'titlestring' shows CWD #39233 - 6583833ee2ac pack: GIT_DIR/GIT_WORK_TREE env vars may interfere #39279 - df3d7e36d0a8 pack: make 'stash' call compatible with older Git #38679 - 1a5d41a48fcc pack: more advice for out-of-sync lockfile #38931 - ca0e3818c0fb pum: crash with 'pumborder' and wide item (#38852) - 38be4475c696 pum: info float width grows on reselect with 'linebreak' #38680 - eee2d10fd2b8 rpc: trigger UILeave earlier on channel close (#38846) - 898ccbc68a6e smoothscroll: crash when resizing to textoff with showbreak - 5ac95da8ead7 statusline: no window-local highlights for last line 'ruler' #38879 - ffb0ebb752ba substitute: don't crash with very large count (#39272) - abcc5342eee8 terminal: do not reflow altscreen on resize #39024 - d3ef77639ac5 terminal: forward streamed bracketed paste properly (#39152) - 111c7f434e2e treesitter: TSNode:id() with NUL byte causes unreliable select() #39134 - 2ea9ed32e4e7 treesitter: restore highlighting on 32 bit systems #39091 - c294bc397b6a tui: check background color on resume - b08c289a4593 ui2: dialog paging is inconsistent #39128 - c6b5eb30de14 ui2: don't dismiss expanded messages for non-typed key #39247 - c6578ea28b58 vim.filetype: match() fails if g:ft_ignore_pat is not defined #39158 - a15e27fbcf60 vim.pos: Range:intersect() drops `buf` #38898 VIM PATCHES -------------------------------------------------------------------------------- - 27214645f608 450895d: runtime(make): fix wrong highlighting with $ inside double quotes (#39177) - 891c6c91505a 8.2.2440: documentation based on patches is outdated (#39144) - e203257fffa6 9.2.0331: spellfile: stack buffer overflows in spell file generation (#38948) - 8ba79b460129 9.2.0345: Wrong autoformatting with 'autocomplete' (#39060) - 9c1122983286 9.2.0357: [security]: command injection via backticks in tag files (#39102) - 515300674733 9.2.0364: tests: test_smoothscroll_textoff_showbreak() fails - 187a34d59bd9 9.2.0380: completion: a few issues in completion code (#39264) - 15d824e5d65d 9.2.0385: Integer overflow with "ze" and large 'sidescrolloff' (#39289) - 19a54ad964a7 e666597: runtime(doc): make window option description a bit less vague (#39173) - d672f0f494a6 partial:9.2.0348: potential buffer underrun when setting statusline like option (#39063) OTHER -------------------------------------------------------------------------------- - ed47b27ad4c0 feat(api): rename buffer to buf (#38899) - 570d8fd128c3 feat(api): rename buffer to buf in retval #39015 - 15991abaa7f2 feat(events): trigger MarkSet autocmd in :delmarks (#39218) - b6a3ad3979cc fix(ui2): ensure msg window is visible after closing tab (#39245) - 099489b985c6 refactor: update usages of deprecated "buffer" param #39090 - 55d3d1bbeb22 test(lsp): extract buf/util parts from lsp_spec.lua (#39170)
2026-04-22fix(cmdline): avoid 'incsearch' recursion after redraw #39303luukvbaal4
Problem: A vim.ui_attach() callback that redraws to show a 'verbose' regex message during 'incsearch' results in recusive redrawing. Solution: Check that curwin was redrawn instead of just any window when determining if 'incsearch' highlighting was cleared. (cherry picked from commit 61fb88992d34d16b3058dcd8b1664f575449d964)
2026-04-22backport: fix(ui2): ensure msg window is visible after closing tab (#39245)neovim-backports[bot]2
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 607fcfb37acd78b0e26c35acb463093957d94c45) Co-authored-by: Luuk van Baal <luukvbaal@gmail.com> Co-authored-by: Linykq <yukunlin590@gmail.com>
2026-04-22fix(float): don't unload 'hidden' float buffer with :close! (#39304)neovim-backports[bot]2
Problem: When closing floating windows to close a tabpage, if the current buffer will unload, buffers contained in those floating windows will too (unexpectedly). Solution: Don't pass along "free_buf" argument; check 'bufhidden' for the buffer in the to be closed float. (cherry picked from commit 5b0ad4a0607498616b984c63ae1a6903cb835c66) Co-authored-by: luukvbaal <luukvbaal@gmail.com>
2026-04-22docs(quickfix): quickfix window location (#39305)neovim-backports[bot]1
Problem: Documentation for quickfix window location is outdated (since 6256adde). Solution: Update quickfix.txt. (cherry picked from commit 2ca31eddae0748de5d54207c2d34f7405fed4f29) Co-authored-by: luukvbaal <luukvbaal@gmail.com>
2026-04-22test(tui_spec): fix "Uncaught Error" with PUC Lua (#39301)neovim-backports[bot]1
RUN T339 TUI :restart ZR: Uncaught Error: test/client/uv_stream.lua:111: ECONNRESET stack traceback: [C]: in function 'error' test/client/uv_stream.lua:111: in function <test/client/uv_stream.lua:109> [C]: in function 'run' test/client/session.lua:240: in function '_run' test/client/session.lua:216: in function '_blocking_request' test/client/session.lua:117: in function 'request' ...t_xdg_terminal/test/functional/terminal/tui_spec.lua:223: in function <...t_xdg_terminal/test/functional/terminal/tui_spec.lua:215> [C]: in function 'pcall' test/testutil.lua:82: in function 'retry' ...t_xdg_terminal/test/functional/terminal/tui_spec.lua:215: in function 'assert_restarted' ...t_xdg_terminal/test/functional/terminal/tui_spec.lua:275: in function <...t_xdg_terminal/test/functional/terminal/tui_spec.lua:232> [C]: in function 'xpcall' /home/runner/work/neovim/neovim/test/harness.lua:693: in function 'run_callable' /home/runner/work/neovim/neovim/test/harness.lua:1008: in function 'run_test' /home/runner/work/neovim/neovim/test/harness.lua:1083: in function 'run_suite' /home/runner/work/neovim/neovim/test/harness.lua:1081: in function 'run_suite' /home/runner/work/neovim/neovim/test/harness.lua:1081: in function 'run_suite' /home/runner/work/neovim/neovim/test/harness.lua:1507: in function 'run_test_file' /home/runner/work/neovim/neovim/test/harness.lua:1577: in function 'run_iteration' /home/runner/work/neovim/neovim/test/harness.lua:1665: in function 'main' /home/runner/work/neovim/neovim/test/runner.lua:30: in main chunk -- Tests exited non-zero: 255 CMake Error at /home/runner/work/neovim/neovim/cmake/RunTests.cmake:135 (message): functional tests failed with error: 255 (cherry picked from commit ead1478b69ec838383b822bd82768a2e235dfd9d) Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2026-04-22fix(:restart): avoid ERR/WRN logging on Windows with --listen (#39287)zeertzjq4
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 208951cbc0ccf05b78edbaa10cfa00175e84f864)
2026-04-22fix(options): default 'titlestring' shows CWD #39233Nick Krichevsky6
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 e68e76935267afbf84bff9fffa69f963ebce0f5a)
2026-04-22fix(:restart): --listen reusage on windows #39281neovim-backports[bot]4
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 5891f2f3dc41eda44c0072d726cf95e54aba85ad) Co-authored-by: Sanzhar Kuandyk <92693103+SanzharKuandyk@users.noreply.github.com>
2026-04-22fix(pack): GIT_DIR/GIT_WORK_TREE env vars may interfere #39279fleesk2
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 e53e728c925641397bc25969457db67189a2eb75)
2026-04-22fix(cmd): ++p, ++edit should match "word" boundary #39146glepnir2
Problem: `:write ++patate foo` doesn't error out, instead it turns on mkdir_p and uses "atate foo" as the filename. Same with ++edit. The parser just does strncmp without checking what comes after. Solution: require the next char after the option name to not be a letter (cherry picked from commit 44770bb924844700e05aef4f81850f0378183ad9)
2026-04-22vim-patch:9.2.0385: Integer overflow with "ze" and large 'sidescrolloff' ↵zeertzjq3
(#39289) Problem: Integer overflow with "ze" and large 'sidescrolloff'. Solution: Check for overflow to avoid negative w_leftcol (zeertzjq). closes: vim/vim#20026 https://github.com/vim/vim/commit/33f3965087b01dccf4382ed419d34799ffd66cd9 (cherry picked from commit 1569a71c8a51287628cb5257e45d2e68f1181551)
2026-04-21backport: refactor(test): drop deprecated exc_exec #39255Justin M. Keyes84
2026-04-21build: gen_char_blob.lua: "bad argument to format" if path contains "%" #39274Justin M. Keyes1
Problem: Build fails if user cloned the repo to a path with "%" chars: src/gen/gen_char_blob.lua:51: bad argument #1 to 'format' (number expected, got string) Solution: - Escape "%" chars. - Also use "%q" in case the path has spaces... (cherry picked from commit 4af0c5d8df5d72af28c171007d35e4e6285a0f57)
2026-04-21fix(substitute): don't crash with very large count (#39272)zeertzjq5
(cherry picked from commit ac8459a09c9076282fc6a622a6f28dd0a0e1cde1)
2026-04-21vim-patch:9.2.0380: completion: a few issues in completion code (#39264)zeertzjq1
Problem: ins_compl_stop() sets compl_best_matches = 0, but that's a pointer, should reset compl_num_bests instead, find_common_prefix() reads cpt_sources_array[cur_source] without checking cur_source != -1 which causes an OOB for -1, find_next_completion_match(): second `if` in the pending loop should be `else if`. Forward paging only moves one step per call. Solution: Reset compl_num_bests instead, add a check for cur_source not equal -1, change if to else if (glepnir) closes: vim/vim#20000 https://github.com/vim/vim/commit/b328686d6a1eae1c519a0cdc0420c0d87b6d1fd1 Co-authored-by: glepnir <glephunter@gmail.com> (cherry picked from commit 3f9500e75d816490fb670c92074bcc92fd84e5f3)
2026-04-21fix(move): avoid integer overflow with large 'scrolloff' (#39251)zeertzjq6
(cherry picked from commit 901b3f0c394a53961781ebeee682e64ad690a242)
2026-04-20fix(ui2): don't dismiss expanded messages for non-typed key #39247luukvbaal3
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 faa7c15b5a711435ed9d90f7fbf2a2ff8f1255c7)
2026-04-20docs: misc #39243Justin M. Keyes10
2026-04-20fix(api): expose fg_indexed/bg_indexed in nvim_get_hl (#39240)Justin M. Keyes7
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 01861c2f955119cc88158273e100b3490c3df6e1) Co-authored-by: glepnir <glephunter@gmail.com>
2026-04-20vim-patch:9.2.0364: tests: test_smoothscroll_textoff_showbreak() failszeertzjq1
Problem: tests: test_smoothscroll_textoff_showbreak() fails (after v9.2.0363) Solution: Add missing CheckRunVimInTerminal related: vim/vim#20011 https://github.com/vim/vim/commit/618a327ce6f6c7a47bdbf2a4f5d1c329d97e6037 Co-authored-by: Christian Brabandt <cb@256bit.org> (cherry picked from commit 2ee25ba41be465f36e4b67bf45f75d6563754d39)
2026-04-20fix(smoothscroll): crash when resizing to textoff with showbreakJaehwang Jung3
vim-patch:9.2.0362: division by zero with smoothscroll and small windows Problem: Resizing a smoothscrolled wrapped window to its textoff width with 'showbreak' can leave wrapped continuation lines with zero text width. win_lbr_chartabsize() still runs the partial max_head_vcol calculation in that state and divides by width2, crashing during redraw. Solution: Skip that partial head calculation when the wrapped continuation width is zero, matching the other width2 guards in charset.c (Jaehwang Jung) closes: vim/vim#20012 AI-assisted: Codex https://github.com/vim/vim/commit/0e31fb024c846e36bb0d26d01ff179a0d1b3eae4 (cherry picked from commit 79a7a4abe11f9b678cbf7073a4464fbe8631d57a)
2026-04-19fix(drawline): hang while redrawing diff filler above fold #39219Jaehwang Jung2
Problem: win_line() falls into infinite loop when a diff window has top filler above its first visible buffer line, that first visible buffer line is a closed fold, and the folded line uses normal non-empty foldtext. Solution: Allow flushing pending diff filler rows even when the underlying buffer line is folded with foldtext. AI-assisted: Codex Co-authored-by: zeertzjq <zeertzjq@outlook.com> (cherry picked from commit f2cc0a249d20462619801a194b67f6ab1d48476c)
2026-04-19backport docs: misc (#39206)Justin M. Keyes18
docs: misc (cherry picked from commit 54398c587473c0f1d96b601a281477e184865401)
2026-04-19backport: feat(events): trigger MarkSet autocmd in :delmarks (#39218)Ashley Hauck4
Problem: `api.nvim_buf_del_mark` already emits a `MarkSet` event with `col` and `line` set to 0. However, `:delmarks` currently emits no events. Solution: Change `:delmarks` to emit the same `col==line==0` event.