mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user