aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-01 20:22:48 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-02 08:06:37 +0800
commit39f85cdf6b40cbdd26256260d0d6d4e071b631a2 (patch)
tree4edecc7da99f4878bff893740b932a1b0c1d01a2 /src/nvim/eval/funcs.c
parent20bd4d89977005845c070cde9df75496f948fa1e (diff)
downloadrneovim-39f85cdf6b40cbdd26256260d0d6d4e071b631a2.tar.gz
rneovim-39f85cdf6b40cbdd26256260d0d6d4e071b631a2.tar.bz2
rneovim-39f85cdf6b40cbdd26256260d0d6d4e071b631a2.zip
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
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r--src/nvim/eval/funcs.c4
1 files changed, 4 insertions, 0 deletions
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);