diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-01 18:46:34 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-09-02 22:28:57 +0800 |
commit | 1ef7720567b08caec0c077605fb2a01a9d6eafbc (patch) | |
tree | 5859afe514570e94c30c42ae5453729e172cf8ac /runtime | |
parent | 2afcdbd63a5b0cbeaad9d83b096a3af5201c67a9 (diff) | |
download | rneovim-1ef7720567b08caec0c077605fb2a01a9d6eafbc.tar.gz rneovim-1ef7720567b08caec0c077605fb2a01a9d6eafbc.tar.bz2 rneovim-1ef7720567b08caec0c077605fb2a01a9d6eafbc.zip |
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.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/api.txt | 2 | ||||
-rw-r--r-- | runtime/lua/man.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 82978d0b3c..a4fe71bc86 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -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 diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua index 4b8239ce74..82ed0305f7 100644 --- a/runtime/lua/man.lua +++ b/runtime/lua/man.lua @@ -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 |