mirror of
https://github.com/neovim/neovim.git
synced 2026-07-29 20:08:03 +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:
@@ -203,10 +203,10 @@ local function try_query_terminal_color(color)
|
||||
local hex = nil
|
||||
local au = vim.api.nvim_create_autocmd('TermResponse', {
|
||||
once = true,
|
||||
callback = function(args)
|
||||
callback = function(ev)
|
||||
hex = '#'
|
||||
.. table.concat({
|
||||
args.data.sequence:match('\027%]%d+;%d*;?rgb:(%w%w)%w%w/(%w%w)%w%w/(%w%w)%w%w'),
|
||||
ev.data.sequence:match('\027%]%d+;%d*;?rgb:(%w%w)%w%w/(%w%w)%w%w/(%w%w)%w%w'),
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user