diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-01 11:44:43 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-01 11:44:43 +0000 |
commit | 873f41a0187e81a22aa4622fbf938de72a54abba (patch) | |
tree | e129244b90c0a84d6a1e4f4b027ccdc8c5af1f81 /src/evalwindow.c | |
parent | 7a7db047dcb2336de5103e793345eb5a9d125900 (diff) |
patch 9.0.0824: crash when using win_move_separator() in other tab pagev9.0.0824
Problem: Crash when using win_move_separator() in other tab page.
Solution: Check for valid window in current tab page.
(closes #11479, closes #11427)
Diffstat (limited to 'src/evalwindow.c')
-rw-r--r-- | src/evalwindow.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/evalwindow.c b/src/evalwindow.c index 98c7ff3084..bc5925182e 100644 --- a/src/evalwindow.c +++ b/src/evalwindow.c @@ -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); |