mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
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)
86e6717ace
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user