mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 09:02:40 +00:00
docs: update vim.schedule param name and type
Per https://github.com/neovim/neovim/pull/25286#discussion_r1332861721 and https://github.com/neovim/neovim/pull/25286#discussion_r1334318352
This commit is contained in:
@@ -956,12 +956,12 @@ vim.rpcrequest({channel}, {method}, {args}, {...}) *vim.rpcrequest()*
|
|||||||
• {args} any[]|nil
|
• {args} any[]|nil
|
||||||
• {...} any|nil
|
• {...} any|nil
|
||||||
|
|
||||||
vim.schedule({callback}) *vim.schedule()*
|
vim.schedule({fn}) *vim.schedule()*
|
||||||
Schedules {callback} to be invoked soon by the main event-loop. Useful to
|
Schedules {fn} to be invoked soon by the main event-loop. Useful to avoid
|
||||||
avoid |textlock| or other temporary restrictions.
|
|textlock| or other temporary restrictions.
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
• {callback} fun()
|
• {fn} (function)
|
||||||
|
|
||||||
vim.str_byteindex({str}, {index}, {use_utf16}) *vim.str_byteindex()*
|
vim.str_byteindex({str}, {index}, {use_utf16}) *vim.str_byteindex()*
|
||||||
Convert UTF-32 or UTF-16 {index} to byte index. If {use_utf16} is not
|
Convert UTF-32 or UTF-16 {index} to byte index. If {use_utf16} is not
|
||||||
|
|||||||
@@ -194,10 +194,10 @@ function vim.str_utfindex(str, index) end
|
|||||||
--- @return string|nil Converted string if conversion succeeds, `nil` otherwise.
|
--- @return string|nil Converted string if conversion succeeds, `nil` otherwise.
|
||||||
function vim.iconv(str, from, to, opts) end
|
function vim.iconv(str, from, to, opts) end
|
||||||
|
|
||||||
--- Schedules {callback} to be invoked soon by the main event-loop. Useful
|
--- Schedules {fn} to be invoked soon by the main event-loop. Useful
|
||||||
--- to avoid |textlock| or other temporary restrictions.
|
--- to avoid |textlock| or other temporary restrictions.
|
||||||
--- @param callback fun()
|
--- @param fn function
|
||||||
function vim.schedule(callback) end
|
function vim.schedule(fn) end
|
||||||
|
|
||||||
--- Wait for {time} in milliseconds until {callback} returns `true`.
|
--- Wait for {time} in milliseconds until {callback} returns `true`.
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user