Skip to content

Conversation

neovim-backports[bot]
Copy link

Description

Backport of #34024 to release-0.11.

Problem: on_detach may be called after buf_freeall and other important things,
plus its textlock restrictions are insufficient. This can cause issues such as
leaks, internal errors and crashes.

Solution: disable buffer updates in buf_freeall, before autocommands (like the
order after #35355 and when do_ecmd reloads a buffer). Don't do so in
free_buffer_stuff; it's not safe to run user code there, and buf_freeall already
runs before then; just free them to avoid leaks if buf_freeall autocommands
registered more for some reason.

Fixes #28084
Fixes #33967
Fixes #35116

(cherry picked from commit 2211953)
@github-actions github-actions bot enabled auto-merge (rebase) August 17, 2025 22:15
@github-actions github-actions bot added api libnvim, Nvim RPC API target:release labels Aug 17, 2025
@justinmk justinmk disabled auto-merge August 17, 2025 22:38
@justinmk justinmk merged commit 3ab06d5 into release-0.11 Aug 17, 2025
29 of 31 checks passed
@justinmk justinmk deleted the backport-34024-to-release-0.11 branch August 17, 2025 22:39
justinmk added a commit to justinmk/neovim that referenced this pull request Aug 31, 2025
See runtime/doc/news.txt (or `:help news` in Nvim).

Following is a list of fix/feature commits in this release.

FEATURES
--------------------------------------------------------------------------------
- 5551da7 lsp: improve signature help display neovim#35190
- abfbd15 provider: detect venv python via "pynvim-python" tool neovim#35273

BUILD
--------------------------------------------------------------------------------
- 3343ee9 deps: CMake generation fails when path contains spaces neovim#35332

FIXES
--------------------------------------------------------------------------------
- 2728269 api: fix not capturing output in cmdline mode (neovim#35322)
- 09b0003 api: nvim_create_user_command addr option should allow ranges neovim#35077
- 3ab06d5 api: on_detach consistently before buf_freeall autocmds (neovim#35369)
- 53db7fc api,lsp: call on_detach before wiping out the buffer neovim#35367
- 30b801e checkhealth: wrong ABI version for treesitter parsers neovim#35327
- a05b70b clipboard: correct blockwise register width computation (neovim#35038)
- 990b320 cmdline: :checkhealth completion with multiple args (neovim#35060)
- a3590af diff: set default diff flags properly (neovim#35450)
- f4b4c27 float: cursor visible in "hidden" floating window (neovim#35219)
- 3cf9dac folds: error when deleting lines at end of buffer neovim#35396
- d70d469 health: accept TERM=tmux-direct neovim#35511
- edfb447 health: update advice for Python neovim#35564
- 359d65c iter: ArrayIter:last returns nil when filtered to empty neovim#34697
- 44b8255 lsp: close floating preview window correctly neovim#34946
- 6b82025 lsp: don't override `config.title` in `vim.lsp.buf.signature_help()` neovim#35075
- 8f2d6f7 lsp: show title when global winborder is set (neovim#35181)
- 1bea812 lsp: update window title when cycling through signatures neovim#35407
- 9261aef lsp/health: always use vim.inspect to show root_markers (neovim#34667)
- d185057 lsp/health: ensure valid table before concatenating (neovim#34930)
- 09f702b lua: report error in Lua Funcref callback properly (neovim#35555)
- 7f1e112 pum: check for cmdline mode properly
- 41fa343 snippet: jumping backwards to choice node (neovim#35062)
- 2e4baa3 snippet: setting end_right_gravity (neovim#35061)
- 4b957a4 treesitter: inconsistent highlight of multiline combined injection neovim#35307
- fa64f2d treesitter: run FileType autocmds in the context of `<abuf>`
- e841d65 treesitter: show capture-level priorities in :Inspect neovim#35443
- e299430 tui: do not remove SIGWINCH handler when resize events are enabled (neovim#35221) (neovim#35238)
- 64afa93 tutor: use `invalidate` field in `nvim_buf_set_extmark()`
- 2124146 tutor: use legacy syntax for lesson 3.1 of vim-01-beginner.tutor
- 6fd842a ui: check for cmdline mode properly

VIM PATCHES
--------------------------------------------------------------------------------
- e68d3ef 5ddcecf: runtime(help): Add better support for language annotation highlighting
- 35a66f7 6fea0a5: runtime(help): Add Vim lang annotation support for codeblocks
- 819e545 714671d: runtime(misc): use :hor :term to ensure new term window is split horizontally (neovim#35064)
- a65c4be 8.1.0425: ml_get error and crash with appendbufline()
- 8dd8805 8.2.1672: v_lock is used when it is not initialized (neovim#35416)
- 6c2f06b 9.1.0748: :keep* commmands are sometimes misidentified as :k
- 54c2ea1 9.1.1599: :bnext doesn't go to unlisted help buffers (neovim#35216)
- 53a0d99 9.1.1601: Patch v8.1.0425 was wrong
- ced4eed 9.1.1607: :apple command detected as :append (neovim#35237)
- bd4b45d 9.1.1608: No command-line completion for :unsilent {command}
- d21db34 9.1.1611: possible undefined behaviour in mb_decompose() (neovim#35275)
- 744d96b 9.1.1612: Ctrl-G/Ctrl-T do not ignore the end search delimiter
- 5ec7d98 9.1.1613: tests: test_search leaves a few swapfiles behind
- 39ae9a9 9.1.1633: Search pattern shown incorrectly with negative offset (neovim#35337)
- e6ea97a 9.1.1665: Outdated comment in eval.c (neovim#35436)
- 6fd8ba0 9.1.1667: Another outdated comment in eval.c (neovim#35438)
- 4c5cb95 9.1.1688: potential buffer overrun in bufwrite.c (neovim#35497)
- 9981747 9.1.1700: Multiline ignorecase specific pattern does not match with 'ignorecase' (neovim#35520)
- fb6c677 b9ea0a8: runtime(doc): tweak documentation style in helphelp.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api libnvim, Nvim RPC API target:release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants