Files
neovim/runtime/lua
Yi Ming be8d87014c fix(lsp): on detach, cancel pending foldingRange requests #31509
Problem:
1. Open a relatively large file (so the server needs some time to
   process the request).
2. Then immediately execute `:bdelete`.
3. Once the request is completed, the handler will obtain the bufstate
   of a buffer already unloaded.

    Error executing vim.schedule lua callback: ...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:119: assertion failed!
    stack traceback:
            [C]: in function 'assert'
            ...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:119: in function 'multi_handler'
            ...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:140: in function 'handler'
            ...HEAD-c137841_1/share/nvim/runtime/lua/vim/lsp/client.lua:669: in function ''
            vim/_editor.lua: in function <vim/_editor.lua:0>

Solution:
On detach, cancel all pending textDocument_foldingRange requests.
2025-02-12 06:22:59 -08:00
..
2025-02-09 18:10:54 +01:00