1
0
forked from aniani/vim

patch 9.0.0824: crash when using win_move_separator() in other tab page

Problem:    Crash when using win_move_separator() in other tab page.
Solution:   Check for valid window in current tab page.
            (closes #11479, closes #11427)
This commit is contained in:
zeertzjq
2022-11-01 11:44:43 +00:00
committed by Bram Moolenaar
parent 7a7db047dc
commit 873f41a018
4 changed files with 27 additions and 4 deletions

View File

@@ -889,6 +889,11 @@ f_win_move_separator(typval_T *argvars, typval_T *rettv)
wp = find_win_by_nr_or_id(&argvars[0]);
if (wp == NULL || win_valid_popup(wp))
return;
if (!win_valid(wp))
{
emsg(_(e_cannot_resize_window_in_another_tab_page));
return;
}
offset = (int)tv_get_number(&argvars[1]);
win_drag_vsep_line(wp, offset);