mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
fix(column): use maxwidth to allocate/fill 'statuscolumn' click defs #24190
Use the actual width of the 'statuscolumn' to allocate and fill its click definition array. The returned width of the built statuscolumn string may be shorter (and is padded later).
This commit is contained in:
parent
e0453d7f57
commit
a878e02d5d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user