mirror of
https://github.com/neovim/neovim.git
synced 2026-04-29 10:44:08 +00:00
fix(api): nvim_open_tabpage "after" like :[count]tab
Problem: "after" in nvim_open_tabpage is inconsistent with how a count works with :tab, :tabnew, etc. Plus, the name "after" implies it's inserted after that number. Solution: internally offset by 1. Allow negative numbers to mean after current. Hmm, should we even reserve sentinels for after current? Callers can probably just use nil...
This commit is contained in:
4
runtime/lua/vim/_meta/api.lua
generated
4
runtime/lua/vim/_meta/api.lua
generated
@@ -1679,8 +1679,8 @@ function vim.api.nvim_notify(msg, log_level, opts) end
|
||||
--- Use 0 for current buffer.
|
||||
--- @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: 0).
|
||||
--- 0 = after current, 1 = first, N = before Nth.
|
||||
--- - 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user