mirror of
https://github.com/neovim/neovim.git
synced 2026-04-29 18:54:18 +00:00
docs: use "ev" convention in event-handlers
Problem: In autocmd examples, using "args" as the event-object name is vague and may be confused with a user-command. Solution: Use "ev" as the conventional event-object name.
This commit is contained in:
@@ -23,8 +23,8 @@ function M.paste(reg)
|
||||
return function()
|
||||
local contents = nil --- @type string?
|
||||
local id = vim.api.nvim_create_autocmd('TermResponse', {
|
||||
callback = function(args)
|
||||
local resp = args.data.sequence ---@type string
|
||||
callback = function(ev)
|
||||
local resp = ev.data.sequence ---@type string
|
||||
local encoded = resp:match('\027%]52;%w?;([A-Za-z0-9+/=]*)')
|
||||
if encoded then
|
||||
contents = vim.base64.decode(encoded)
|
||||
|
||||
Reference in New Issue
Block a user