aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-01 07:29:55 +0800
committerGitHub <noreply@github.com>2022-11-01 07:29:55 +0800
commitd8dbf58b4372d1415e3ca69541fc6fe71890ba53 (patch)
treec8340d05ad2763d01bf5102e199ea690bdde91db /src/nvim/eval/funcs.c
parent428ab6f24e6b5bae60a71138d571d57ac18528d5 (diff)
downloadrneovim-d8dbf58b4372d1415e3ca69541fc6fe71890ba53.tar.gz
rneovim-d8dbf58b4372d1415e3ca69541fc6fe71890ba53.tar.bz2
rneovim-d8dbf58b4372d1415e3ca69541fc6fe71890ba53.zip
vim-patch:9.0.0821: crash with win_move_statusline() in another tabpage (#20894)
vim-patch:86e6717ace4f Problem: Crash when using win_move_statusline() in another tab page. Solution: Check for valid window pointer. (issue vim/vim#11427) https://github.com/vim/vim/commit/86e6717ace4f5e00eaeb84b59e3fc92bca548155 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r--src/nvim/eval/funcs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index e08dc2e4a5..17781cf4ef 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -112,6 +112,8 @@ PRAGMA_DIAG_POP
static char *e_listblobarg = N_("E899: Argument of %s must be a List or Blob");
static char *e_invalwindow = N_("E957: Invalid window number");
static char *e_reduceempty = N_("E998: Reduce of an empty %s with no initial value");
+static char e_cannot_resize_window_in_another_tab_page[]
+ = N_("E1308: Cannot resize a window in another tab page");
/// Dummy va_list for passing to vim_snprintf
///
@@ -9694,6 +9696,10 @@ static void f_win_move_statusline(typval_T *argvars, typval_T *rettv, EvalFuncDa
if (wp == NULL || wp->w_floating) {
return;
}
+ if (!win_valid(wp)) {
+ emsg(_(e_cannot_resize_window_in_another_tab_page));
+ return;
+ }
offset = (int)tv_get_number(&argvars[1]);
win_drag_status_line(wp, offset);