aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/buf.lua
diff options
context:
space:
mode:
authorphanium <91544758+phanen@users.noreply.github.com>2025-02-10 00:40:43 +0800
committerGitHub <noreply@github.com>2025-02-09 08:40:43 -0800
commitcd3855fb2be78e2dc2d2ca4b8e950d9d9d9081bb (patch)
treed381f66592e4dce8c188e16a1cc5a5531b14cd4b /runtime/lua/vim/lsp/buf.lua
parent8c2571991ad748b0ee71529951e1502e553aa8ba (diff)
downloadrneovim-cd3855fb2be78e2dc2d2ca4b8e950d9d9d9081bb.tar.gz
rneovim-cd3855fb2be78e2dc2d2ca4b8e950d9d9d9081bb.tar.bz2
rneovim-cd3855fb2be78e2dc2d2ca4b8e950d9d9d9081bb.zip
fix(lua): vim.tbl_get({}, nil, 1) should return nil #32218
Problem: `vim.tbl_get(tbl, nil, 1)` returns `tbl` itself. In this case, `keys` is not empty, but `ipairs` skips the iteration: local keys = { nil, 1 } assert(#keys == 2) for i, k in ipairs(keys) do assert(false, 'unreachable') end Solution: Use `select("#", ...)` and `select(i, ...)` to ensure consistency for count and iteration.
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
0 files changed, 0 insertions, 0 deletions