mirror of
https://github.com/neovim/neovim.git
synced 2026-05-01 19:45:02 +00:00
fix(api): nvim_open_tabpage positional "enter"
Problem: nvim_open_tabpage's "enter" argument is optional, which is inconsistent with nvim_open_win. Solution: make it a (non-optional) positional argument, like nvim_open_win. Also change "enter"'s description to be more like nvim_open_win's doc.
This commit is contained in:
4
runtime/lua/vim/_meta/api.lua
generated
4
runtime/lua/vim/_meta/api.lua
generated
@@ -1677,12 +1677,12 @@ function vim.api.nvim_notify(msg, log_level, opts) end
|
||||
---
|
||||
--- @param buffer integer Buffer to open in the first window of the new tabpage.
|
||||
--- Use 0 for current buffer.
|
||||
--- @param enter boolean Enter the tabpage (make it the current tabpage).
|
||||
--- @param config vim.api.keyset.tabpage_config Configuration for the new tabpage. Keys:
|
||||
--- - enter: Whether to enter the new tabpage (default: true)
|
||||
--- - after: Position to insert tabpage (default: -1; after current).
|
||||
--- 0 = first, N = after Nth.
|
||||
--- @return integer # Tabpage handle of the created tabpage
|
||||
function vim.api.nvim_open_tabpage(buffer, config) end
|
||||
function vim.api.nvim_open_tabpage(buffer, enter, config) end
|
||||
|
||||
--- Open a terminal instance in a buffer
|
||||
---
|
||||
|
||||
1
runtime/lua/vim/_meta/api_keysets.lua
generated
1
runtime/lua/vim/_meta/api_keysets.lua
generated
@@ -438,7 +438,6 @@ error('Cannot require a meta file')
|
||||
--- @field _subpriority? integer
|
||||
|
||||
--- @class vim.api.keyset.tabpage_config
|
||||
--- @field enter? boolean
|
||||
--- @field after? integer
|
||||
|
||||
--- @class vim.api.keyset.user_command
|
||||
|
||||
Reference in New Issue
Block a user