diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/api.txt | 7 | ||||
-rw-r--r-- | runtime/doc/news.txt | 2 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/api.lua | 6 |
3 files changed, 15 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 90c9d0ccbb..1831b78e9e 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3336,6 +3336,13 @@ nvim_tabpage_set_var({tabpage}, {name}, {value}) • {name} Variable name • {value} Variable value +nvim_tabpage_set_win({tabpage}, {win}) *nvim_tabpage_set_win()* + Sets the current window in a tabpage + + Parameters: ~ + • {tabpage} Tabpage handle, or 0 for current tabpage + • {win} Window handle, must already belong to {tabpage} + ============================================================================== Autocmd Functions *api-autocmd* diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 40717f8ecf..3051b81189 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -304,6 +304,8 @@ The following new APIs and features were added. highlight attribute. The TUI will display URLs using the OSC 8 control sequence, enabling clickable text in supporting terminals. +• Added |nvim_tabpage_set_win()| to set the current window of a tabpage. + ============================================================================== CHANGED FEATURES *news-changed* diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index f9fa364158..bedc218626 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -1952,6 +1952,12 @@ function vim.api.nvim_tabpage_list_wins(tabpage) end --- @param value any Variable value function vim.api.nvim_tabpage_set_var(tabpage, name, value) end +--- Sets the current window in a tabpage +--- +--- @param tabpage integer Tabpage handle, or 0 for current tabpage +--- @param win integer Window handle, must already belong to {tabpage} +function vim.api.nvim_tabpage_set_win(tabpage, win) end + --- Calls a function with window as temporary current window. --- --- @param window integer Window handle, or 0 for current window |