Files
neovim/runtime/lua/vim
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-08-17 11:54:53 +08:00
2025-08-17 11:54:53 +08:00
2025-06-06 15:36:48 +01:00
2025-07-10 21:50:46 -04:00
2025-08-24 23:43:48 +00:00
2025-08-03 07:45:49 -07:00
2025-06-14 17:24:36 +02:00