Justin M. Keyes
d8a8825679
feat(lua): vim.wait() returns callback results #35588
...
Problem:
The callback passed to `vim.wait` cannot return results directly, it
must set upvalues or globals.
local rv1, rv2, rv3
local ok = vim.wait(200, function()
rv1, rv2, rv3 = 'a', 42, { ok = { 'yes' } }
return true
end)
Solution:
Let the callback return values after the first "status" result.
local ok, rv1, rv2, rv3 = vim.wait(200, function()
return true, 'a', 42, { ok = { 'yes' } }
end)
2025-09-01 13:26:46 -07:00
..
2025-05-04 11:22:57 -04:00
2024-04-23 18:17:04 +02:00
2025-08-24 23:43:48 +00:00
2025-03-26 07:35:12 +08:00
2025-05-04 11:22:57 -04:00
2025-05-29 12:10:07 +02:00
2024-09-28 00:31:45 +02:00
2025-07-29 18:53:57 -07:00
2024-09-21 16:04:09 +01:00
2025-03-19 05:41:25 -07:00
2025-06-09 09:31:37 -07:00
2025-01-09 09:26:45 -08:00
2025-06-03 06:36:44 -07:00
2025-04-05 15:56:40 -07:00
2025-03-18 09:39:19 +01:00
2025-07-22 17:40:24 -07:00
2025-07-10 19:07:56 -07:00
2025-08-03 07:45:49 -07:00
2024-11-26 06:15:50 -08:00
2025-08-31 06:44:23 +08:00
2024-09-21 16:04:09 +01:00
2025-07-13 13:43:11 -07:00
2025-07-03 11:05:08 +01:00
2025-05-04 11:22:57 -04:00
2025-08-24 23:43:48 +00:00
2025-08-24 23:43:48 +00:00
2025-07-28 22:00:25 -04:00
2025-08-19 06:21:32 -07:00
2024-04-23 18:17:04 +02:00
2025-08-17 20:40:28 -07:00
2025-07-10 21:50:46 -04:00
2025-02-26 23:06:22 +01:00
2025-07-12 20:54:22 -07:00
2025-07-09 09:33:19 +00:00
2024-10-18 02:22:15 -07:00
2024-12-11 05:48:17 -08:00
2025-05-04 11:22:57 -04:00
2025-06-30 20:59:44 +03:00
2025-09-01 13:26:46 -07:00
2024-12-31 15:54:06 +01:00
2025-04-21 15:05:34 -07:00
2025-07-12 22:36:07 +00:00