mirror of
https://github.com/neovim/neovim.git
synced 2026-07-22 09:01:45 +00:00
refactor: update usages of deprecated "buffer" param #39089
This commit is contained in:
@@ -1819,7 +1819,7 @@ describe('nvim_buf_attach on_detach', function()
|
||||
_G.events = {}
|
||||
vim.api.nvim_buf_attach(1, false, { on_detach = _G.on_detach })
|
||||
vim.api.nvim_create_autocmd('BufUnload', {
|
||||
buffer = 1,
|
||||
buf = 1,
|
||||
once = true,
|
||||
callback = function()
|
||||
vim.api.nvim_buf_attach(1, false, {
|
||||
@@ -1892,7 +1892,7 @@ it('nvim_buf_attach from buf_freeall autocommands does not leak', function()
|
||||
exec_lua(function()
|
||||
local b = vim.api.nvim_create_buf(true, true)
|
||||
vim.api.nvim_create_autocmd('BufWipeout', {
|
||||
buffer = b,
|
||||
buf = b,
|
||||
once = true,
|
||||
callback = function()
|
||||
vim.api.nvim_buf_attach(b, false, {})
|
||||
|
||||
@@ -2353,7 +2353,7 @@ describe('vim.diagnostic', function()
|
||||
})
|
||||
|
||||
vim.api.nvim_buf_set_lines(_G.diagnostic_bufnr, 2, 5, false, {})
|
||||
vim.api.nvim_exec_autocmds('CursorMoved', { buffer = _G.diagnostic_bufnr })
|
||||
vim.api.nvim_exec_autocmds('CursorMoved', { buf = _G.diagnostic_bufnr })
|
||||
return _G.get_virt_text_extmarks(_G.diagnostic_ns)
|
||||
end)
|
||||
|
||||
@@ -2878,7 +2878,7 @@ describe('vim.diagnostic', function()
|
||||
local result = exec_lua(function()
|
||||
local changed_diags --- @type vim.Diagnostic[]?
|
||||
vim.api.nvim_create_autocmd('DiagnosticChanged', {
|
||||
buffer = _G.diagnostic_bufnr,
|
||||
buf = _G.diagnostic_bufnr,
|
||||
callback = function(ev)
|
||||
--- @type vim.Diagnostic[]
|
||||
changed_diags = ev.data.diagnostics
|
||||
|
||||
Reference in New Issue
Block a user