diff options
| author | glepnir <glephunter@gmail.com> | 2026-04-09 05:10:52 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-08 17:10:52 -0400 |
| commit | 6473d007e7b9f7f14b06190117f0bb0269fa938c (patch) | |
| tree | 3b09a91205da17ec6de947234f7a98b991a31ffb /scripts/lintcommit.lua | |
| parent | 1ff1973269594254900fbce40fd35c3024d9ed3d (diff) | |
| download | rneovim-6473d007e7b9f7f14b06190117f0bb0269fa938c.tar.gz rneovim-6473d007e7b9f7f14b06190117f0bb0269fa938c.tar.bz2 rneovim-6473d007e7b9f7f14b06190117f0bb0269fa938c.zip | |
fix(lsp): apply_text_edits causes unwanted BufDelete events #38778
Problem:
Since 2f6d1d3c887a87d9402137425b418dd12a904aac, `apply_text_edits`
unconditionally sets `buflisted=true`, causing spurious BufDelete events
if plugins restore the original 'buflisted' state on unlisted buffers:
https://github.com/neovim/neovim/blob/65ef6cec1cb766334c59d3255595dfe523b11020/src/nvim/option.c#L2159-L2169
Solution:
- Don't set 'buflisted' in `apply_text_edits`. Set it more narrowly, in
`apply_workspace_edit` where the semantics requires affected buffers
to be visible to the user.
- Also skip setting 'buflisted' if it would not be changed, to avoid
redundant `OptionSet` events.
Diffstat (limited to 'scripts/lintcommit.lua')
0 files changed, 0 insertions, 0 deletions