fix(column): use maxwidth to allocate/fill 'statuscolumn' click defs

This commit is contained in:
Luuk van Baal 2023-06-28 15:04:21 +02:00
parent e0453d7f57
commit d9477a730b

View File

@ -905,9 +905,9 @@ int build_statuscol_str(win_T *wp, linenr_T lnum, long relnum, statuscol_T *stcp
// Only update click definitions once per window per redraw
if (fillclick) {
stl_clear_click_defs(wp->w_statuscol_click_defs, wp->w_statuscol_click_defs_size);
wp->w_statuscol_click_defs = stl_alloc_click_defs(wp->w_statuscol_click_defs, width,
wp->w_statuscol_click_defs = stl_alloc_click_defs(wp->w_statuscol_click_defs, stcp->width,
&wp->w_statuscol_click_defs_size);
stl_fill_click_defs(wp->w_statuscol_click_defs, clickrec, stcp->text, width, false);
stl_fill_click_defs(wp->w_statuscol_click_defs, clickrec, stcp->text, stcp->width, false);
}
return width;