diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-09-15 14:41:29 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-15 14:41:29 +0800 |
| commit | 2debe2f30a4587e307f6e152aafd91b82af46f75 (patch) | |
| tree | 9dfb9760b60c0c388e72aa7b77fdd18eeca03dbf /runtime/lua/vim/lsp/inline_completion.lua | |
| parent | 8e922c657c2d28a2320920d165bf0a6a8cd937d9 (diff) | |
| download | rneovim-2debe2f30a4587e307f6e152aafd91b82af46f75.tar.gz rneovim-2debe2f30a4587e307f6e152aafd91b82af46f75.tar.bz2 rneovim-2debe2f30a4587e307f6e152aafd91b82af46f75.zip | |
fix(lsp): avoid automatic request after leaving insert mode (#35767)
This also fixes the following warning in tests with ASAN or TSAN:
-------- Running tests from test/functional/plugin/lsp/inline_completion_spec.lua
RUN T4604 vim.lsp.inline_completion enable() requests or abort when entered/left insert mode: 225.00 ms OK
RUN T4605 vim.lsp.inline_completion get() applies the current candidate: 212.00 ms OK
nvim took 2013 milliseconds to exit after last test
This indicates a likely problem with the test even if it passed!
RUN T4606 vim.lsp.inline_completion get() accepts on_accept callback: 212.00 ms OK
RUN T4607 vim.lsp.inline_completion select() selects the next candidate: 220.00 ms OK
-------- 4 tests from test/functional/plugin/lsp/inline_completion_spec.lua (3437.00 ms total)
-------- Running tests from test/functional/plugin/lsp/linked_editing_range_spec.lua
nvim took 2011 milliseconds to exit after last test
This indicates a likely problem with the test even if it passed!
Diffstat (limited to 'runtime/lua/vim/lsp/inline_completion.lua')
| -rw-r--r-- | runtime/lua/vim/lsp/inline_completion.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/inline_completion.lua b/runtime/lua/vim/lsp/inline_completion.lua index 07f46f343a..4a1de0cc73 100644 --- a/runtime/lua/vim/lsp/inline_completion.lua +++ b/runtime/lua/vim/lsp/inline_completion.lua @@ -309,6 +309,7 @@ function Completor:abort() method = ms.textDocument_inlineCompletion, type = 'pending', }) + self:reset_timer() self:hide() self.current = nil end |