feat(api): rename buffer to buf in retval #38900

In 3a4a66017b, 4d3a67cd62
we renamed "buffer" to "buf" in dict parameters.

This commit also renames such keys in dict return-values.
This commit is contained in:
Justin M. Keyes
2026-04-13 12:42:26 -04:00
committed by GitHub
parent 938c1e2194
commit df8d98173c
11 changed files with 68 additions and 39 deletions

View File

@@ -2863,7 +2863,8 @@ describe('API', function()
id = id,
argv = argv,
mode = 'terminal',
buffer = buffer,
buf = buffer,
buffer = buffer, -- deprecated
pty = '?',
exitcode = -1,
}
@@ -2883,7 +2884,8 @@ describe('API', function()
neq(nil, string.match(info.pty, '^/dev/'))
end
eq({ info = info }, event)
info.buffer = 1
info.buf = 1
info.buffer = 1 -- deprecated
eq({ [1] = testinfo, [2] = stderr, [3] = info }, api.nvim_list_chans())
eq(info, api.nvim_get_chan_info(3))