vim-patch:8.1.2037: can call win_gotoid() in cmdline window (#20015)

Problem:    Can call win_gotoid() in cmdline window.
Solution:   Disallow switching windows. (Yasuhiro Matsumoto, closes vim/vim#4940)
a046b37c22
This commit is contained in:
zeertzjq
2022-08-31 06:58:28 +08:00
committed by GitHub
parent 94a2bc5940
commit 518b5c65b0
3 changed files with 23 additions and 14 deletions

View File

@@ -7396,19 +7396,6 @@ int win_getid(typval_T *argvars)
return 0;
}
int win_gotoid(typval_T *argvars)
{
int id = (int)tv_get_number(&argvars[0]);
FOR_ALL_TAB_WINDOWS(tp, wp) {
if (wp->handle == id) {
goto_tabpage_win(tp, wp);
return 1;
}
}
return 0;
}
void win_get_tabwin(handle_T id, int *tabnr, int *winnr)
{
*tabnr = 0;