diff options
| author | Stefan van der Wolf <stefan.van.der.wolf@persgroep.net> | 2025-12-15 16:50:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-15 10:50:16 -0500 |
| commit | ad95655ec5d13ff7c728d731eb9fd39f34395a03 (patch) | |
| tree | 2039873010cd891318c12bfdd64fda69bbcb4525 /lsp | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-ad95655ec5d13ff7c728d731eb9fd39f34395a03.tar nvim-lspconfig-ad95655ec5d13ff7c728d731eb9fd39f34395a03.tar.gz nvim-lspconfig-ad95655ec5d13ff7c728d731eb9fd39f34395a03.tar.bz2 nvim-lspconfig-ad95655ec5d13ff7c728d731eb9fd39f34395a03.tar.lz nvim-lspconfig-ad95655ec5d13ff7c728d731eb9fd39f34395a03.tar.xz nvim-lspconfig-ad95655ec5d13ff7c728d731eb9fd39f34395a03.tar.zst nvim-lspconfig-ad95655ec5d13ff7c728d731eb9fd39f34395a03.zip | |
fix(copilot): use correct error variable #4240
Problem:
The client:exec_cmd callback was incorrectly referencing to err variable
from the outer scope instead of the cmd_err variable from its on scope.
Could cause problems when err is nil but the cmd_err is not.
Solution:
Changed the reference from err to cmd_err
Diffstat (limited to 'lsp')
| -rw-r--r-- | lsp/copilot.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lsp/copilot.lua b/lsp/copilot.lua index 66c2dd54..4aa37f43 100644 --- a/lsp/copilot.lua +++ b/lsp/copilot.lua @@ -65,7 +65,7 @@ local function sign_in(bufnr, client) if continue == 1 then client:exec_cmd(command, { bufnr = bufnr }, function(cmd_err, cmd_result) if cmd_err then - vim.notify(err.message, vim.log.levels.ERROR) + vim.notify(cmd_err.message, vim.log.levels.ERROR) return end if cmd_result.status == 'OK' then |
