From 39f85cdf6b40cbdd26256260d0d6d4e071b631a2 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 1 Nov 2022 20:22:48 +0800 Subject: 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 vim/vim#11479, closes vim/vim#11427) https://github.com/vim/vim/commit/873f41a0187e81a22aa4622fbf938de72a54abba --- src/nvim/eval/funcs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/eval') diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 79c93f1917..e676e2e656 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -9690,6 +9690,10 @@ static void f_win_move_separator(typval_T *argvars, typval_T *rettv, EvalFuncDat if (wp == NULL || wp->w_floating) { return; } + if (!win_valid(wp)) { + emsg(_(e_cannot_resize_window_in_another_tab_page)); + return; + } int offset = (int)tv_get_number(&argvars[1]); win_drag_vsep_line(wp, offset); -- cgit