mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 22:36:09 +00:00
fix(column): estimate 'statuscolumn' width appropriately
Problem: The 'statuscolumn' width is being estimated without the proper context. In particular, this resulted in the fact that a custom fold column could be included in the estimated `number_width()`, and doubly added when actually drawing the statuscolumn due to `win_col_off()` also adding the `'foldcolumn'` width. Resulting in a status column that is `'foldcolumn'` cells wider than necessary. Solution: Estimate 'statuscolumn' width in `get_statuscol_str()` when a buffer's line count has changed.
This commit is contained in:
@@ -1392,6 +1392,7 @@ struct window_S {
|
||||
int w_prev_fraction_row;
|
||||
|
||||
linenr_T w_nrwidth_line_count; // line count when ml_nrwidth_width was computed.
|
||||
linenr_T w_statuscol_line_count; // line count when 'statuscolumn' width was computed.
|
||||
int w_nrwidth_width; // nr of chars to print line count.
|
||||
|
||||
qf_info_T *w_llist; // Location list for this window
|
||||
|
Reference in New Issue
Block a user