diff options
Diffstat (limited to 'src/nvim/drawline.c')
-rw-r--r-- | src/nvim/drawline.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index 4247705896..6109652f7d 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -587,12 +587,13 @@ static void draw_statuscol(win_T *wp, winlinevars_T *wlv, linenr_T lnum, int vir char buf[MAXPATHL]; // When a buffer's line count has changed, make a best estimate for the full - // width of the status column by building with "w_nrwidth_line_count". Add - // potentially truncated width and rebuild before drawing anything. + // width of the status column by building with the largest possible line number. + // Add potentially truncated width and rebuild before drawing anything. if (wp->w_statuscol_line_count != wp->w_nrwidth_line_count) { wp->w_statuscol_line_count = wp->w_nrwidth_line_count; set_vim_var_nr(VV_VIRTNUM, 0); - int width = build_statuscol_str(wp, wp->w_nrwidth_line_count, 0, buf, stcp); + int width = build_statuscol_str(wp, wp->w_nrwidth_line_count, + wp->w_nrwidth_line_count, buf, stcp); if (width > stcp->width) { int addwidth = MIN(width - stcp->width, MAX_STCWIDTH - stcp->width); wp->w_nrwidth += addwidth; |