Files
neovim/test/functional/lua
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
..
2024-04-23 18:17:04 +02:00
2025-08-24 23:43:48 +00:00
2025-01-09 09:26:45 -08:00
2025-08-24 23:43:48 +00:00
2025-08-24 23:43:48 +00:00
2024-04-23 18:17:04 +02:00
2025-02-26 23:06:22 +01:00