diff options
author | Ilia Choly <ilia.choly@gmail.com> | 2024-05-23 09:17:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 15:17:53 +0200 |
commit | af200c10cf9d117a14ebf9f2e9c666721a1090d6 (patch) | |
tree | 96f4e94ed24dff6a0ddea56d2c19bf96731470cd /test/functional/plugin/lsp/testutil.lua | |
parent | 2908f71dc9e9591f97e0f9d70dbc8d8b18f9e475 (diff) | |
download | rneovim-af200c10cf9d117a14ebf9f2e9c666721a1090d6.tar.gz rneovim-af200c10cf9d117a14ebf9f2e9c666721a1090d6.tar.bz2 rneovim-af200c10cf9d117a14ebf9f2e9c666721a1090d6.zip |
fix(lsp): check if buffer was detached in on_init callback (#28914)
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
Diffstat (limited to 'test/functional/plugin/lsp/testutil.lua')
-rw-r--r-- | test/functional/plugin/lsp/testutil.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/plugin/lsp/testutil.lua b/test/functional/plugin/lsp/testutil.lua index 4d14752f2a..3430a1e1a3 100644 --- a/test/functional/plugin/lsp/testutil.lua +++ b/test/functional/plugin/lsp/testutil.lua @@ -39,8 +39,7 @@ M.create_server_definition = [[ }) local handler = handlers[method] if handler then - local response, err = handler(method, params) - callback(err, response) + handler(method, params, callback) elseif method == 'initialize' then callback(nil, { capabilities = opts.capabilities or {} |