phanium
cd3855fb2b
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.
2025-02-09 08:40:43 -08:00
..
2025-02-07 06:30:11 +08:00
2024-06-04 06:06:02 -07:00
2025-01-30 13:46:06 +01:00
2025-01-05 12:28:01 +01:00
2025-01-27 16:37:50 +00:00
2025-02-07 22:10:59 +00:00
2025-01-27 16:37:50 +00:00
2025-02-05 09:29:31 +01:00
2023-12-21 11:47:04 +08:00
2024-11-17 13:31:24 -08:00
2024-09-28 00:31:45 +02:00
2025-01-30 13:46:06 +01:00
2025-01-27 16:37:50 +00:00
2024-03-06 10:45:22 +00:00
2025-01-27 16:37:50 +00:00
2024-10-21 00:54:43 +02:00
2025-01-27 16:37:50 +00:00
2024-12-20 01:43:56 -08:00
2024-10-21 11:32:06 +01:00
2025-02-05 15:27:09 +01:00
2024-01-16 09:33:10 +00:00
2025-02-09 11:08:53 +01:00
2025-01-27 16:37:50 +00:00
2025-01-05 12:28:01 +01:00
2025-01-27 16:37:50 +00:00
2025-01-27 16:37:50 +00:00
2025-01-22 07:46:24 -08:00
2025-01-27 16:37:50 +00:00
2024-09-01 13:01:24 -07:00
2024-10-21 11:32:06 +01:00
2024-12-04 10:17:46 -06:00
2025-01-30 13:46:06 +01:00
2024-02-03 16:53:41 +01:00
2025-01-27 16:37:50 +00:00
2024-10-21 11:32:06 +01:00
2025-02-09 08:40:43 -08:00
2025-01-14 21:25:25 -08:00
2024-10-31 11:55:23 +00:00
2024-11-26 13:56:01 -06:00
2025-01-27 16:37:50 +00:00
2024-10-31 11:55:23 +00:00
2025-01-27 16:37:50 +00:00
2024-12-23 05:08:20 -08:00
2025-01-14 19:55:29 -08:00