comparison src/popupwin.c @ 23936:a0e02766e06d v8.2.2510

patch 8.2.2510: internal error when popup with mask is zero height or width Commit: https://github.com/vim/vim/commit/10ccfb2a17e736ace054b19dc712544b4e961671 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 13 21:31:18 2021 +0100 patch 8.2.2510: internal error when popup with mask is zero height or width Problem: Internal error when popup with mask is zero height or width. Solution: Bail out if width or height is zero. (closes https://github.com/vim/vim/issues/7831)
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 Feb 2021 21:45:05 +0100
parents 3033dade50ca
children 0967c54ff3b2
comparison
equal deleted inserted replaced
23935:6668c783ba6f 23936:a0e02766e06d
3329 { 3329 {
3330 listitem_T *lio, *li; 3330 listitem_T *lio, *li;
3331 char_u *cells; 3331 char_u *cells;
3332 int row, col; 3332 int row, col;
3333 3333
3334 if (wp->w_popup_mask == NULL) 3334 if (wp->w_popup_mask == NULL || width == 0 || height == 0)
3335 {
3336 vim_free(wp->w_popup_mask_cells);
3337 wp->w_popup_mask_cells = NULL;
3335 return; 3338 return;
3339 }
3336 if (wp->w_popup_mask_cells != NULL 3340 if (wp->w_popup_mask_cells != NULL
3337 && wp->w_popup_mask_height == height 3341 && wp->w_popup_mask_height == height
3338 && wp->w_popup_mask_width == width) 3342 && wp->w_popup_mask_width == width)
3339 return; // cache is still valid 3343 return; // cache is still valid
3340 3344