docs(api): clarify nvim_win_set_buf documentation #37201

This commit is contained in:
Marc Jakobi
2026-03-06 19:34:47 +01:00
committed by GitHub
parent 301c7065ca
commit 34a59e30db
3 changed files with 8 additions and 3 deletions

View File

@@ -2484,8 +2484,9 @@ function vim.api.nvim_win_hide(window) end
--- @return boolean # true if the window is valid, false otherwise
function vim.api.nvim_win_is_valid(window) end
--- Sets the current buffer in a window, without side effects
--- Sets the current buffer in a window.
---
--- Note: As a side-effect, this executes `BufEnter` and `BufLeave` autocommands.
--- @param window integer `window-ID`, or 0 for current window
--- @param buffer integer Buffer id
function vim.api.nvim_win_set_buf(window, buffer) end