mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.0786: user command does not get number from :tab modifier
Problem: User command does not get number from :tab modifier. Solution: Include the number. (closes #11393, closes #6801)
This commit is contained in:
@@ -1436,7 +1436,24 @@ add_win_cmd_modifers(char_u *buf, cmdmod_T *cmod, int *multi_mods)
|
||||
|
||||
// :tab
|
||||
if (cmod->cmod_tab > 0)
|
||||
result += add_cmd_modifier(buf, "tab", multi_mods);
|
||||
{
|
||||
int tabnr = cmod->cmod_tab - 1;
|
||||
|
||||
if (tabnr == tabpage_index(curtab))
|
||||
{
|
||||
// For compatibility, don't add a tabpage number if it is the same
|
||||
// as the default number for :tab.
|
||||
result += add_cmd_modifier(buf, "tab", multi_mods);
|
||||
}
|
||||
else
|
||||
{
|
||||
char tab_buf[NUMBUFLEN + 3];
|
||||
|
||||
sprintf(tab_buf, "%dtab", tabnr);
|
||||
result += add_cmd_modifier(buf, tab_buf, multi_mods);
|
||||
}
|
||||
}
|
||||
|
||||
// :topleft
|
||||
if (cmod->cmod_split & WSP_TOP)
|
||||
result += add_cmd_modifier(buf, "topleft", multi_mods);
|
||||
|
Reference in New Issue
Block a user