mirror of
https://github.com/neovim/neovim.git
synced 2026-05-02 20:15:03 +00:00
fix(api)!: correctly deal with number before :tab
Now nvim_parse_cmd and nvim_create_user_command use a "tab" value which is the same as the number passed before :tab modifier instead of the number plus 1, and "tab" value is -1 if :tab modifier is not used.
This commit is contained in:
@@ -1846,7 +1846,7 @@ nvim_parse_cmd({str}, {opts}) *nvim_parse_cmd()*
|
||||
• keeppatterns: (boolean) |:keeppatterns|.
|
||||
• lockmarks: (boolean) |:lockmarks|.
|
||||
• noswapfile: (boolean) |:noswapfile|.
|
||||
• tab: (integer) |:tab|.
|
||||
• tab: (integer) |:tab|. -1 when omitted.
|
||||
• verbose: (integer) |:verbose|. -1 when omitted.
|
||||
• vertical: (boolean) |:vertical|.
|
||||
• split: (string) Split modifier string, is an empty string when
|
||||
|
||||
@@ -671,7 +671,7 @@ function M.open_page(count, smods, args)
|
||||
local target = ('%s(%s)'):format(name, sect)
|
||||
|
||||
local ok, ret = pcall(function()
|
||||
if not smods.tab and find_man() then
|
||||
if smods.tab == -1 and find_man() then
|
||||
vim.cmd.tag({ target, mods = { silent = true, keepalt = true } })
|
||||
else
|
||||
smods.silent = true
|
||||
|
||||
Reference in New Issue
Block a user