From 7ea148a1dc1518bc8a6835c0329894a590135937 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 11 Mar 2026 14:25:12 +0100 Subject: 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. --- test/functional/lua/buffer_updates_spec.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test/functional/lua/buffer_updates_spec.lua') diff --git a/test/functional/lua/buffer_updates_spec.lua b/test/functional/lua/buffer_updates_spec.lua index e87407f176..e1a46589f2 100644 --- a/test/functional/lua/buffer_updates_spec.lua +++ b/test/functional/lua/buffer_updates_spec.lua @@ -1776,14 +1776,10 @@ describe('nvim_buf_attach on_detach', function() it('called before buf_freeall autocommands', function() exec_lua(function() vim.api.nvim_create_autocmd({ 'BufUnload', 'BufDelete', 'BufWipeout' }, { - callback = function(args) + callback = function(ev) table.insert( _G.events, - ('%s: %d %s'):format( - args.event, - args.buf, - tostring(vim.api.nvim_buf_is_loaded(args.buf)) - ) + ('%s: %d %s'):format(ev.event, ev.buf, tostring(vim.api.nvim_buf_is_loaded(ev.buf))) ) end, }) -- cgit