diff options
author | luukvbaal <31730729+luukvbaal@users.noreply.github.com> | 2023-03-19 10:21:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-19 09:21:49 +0000 |
commit | eeac80de0cf45951dd696f82e5a823c6de20728c (patch) | |
tree | cfd7fd886c8dd701d84f3edc1220c8f86211faf5 /src/nvim/statusline.c | |
parent | 204a8b17c8ebab1619cc47a920a06dcc348d75f7 (diff) | |
download | rneovim-eeac80de0cf45951dd696f82e5a823c6de20728c.tar.gz rneovim-eeac80de0cf45951dd696f82e5a823c6de20728c.tar.bz2 rneovim-eeac80de0cf45951dd696f82e5a823c6de20728c.zip |
fix(column): invalidate statuscolumn width when UPD_NOT_VALID (#22723)
Diffstat (limited to 'src/nvim/statusline.c')
-rw-r--r-- | src/nvim/statusline.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/nvim/statusline.c b/src/nvim/statusline.c index a54618205e..ca92953b05 100644 --- a/src/nvim/statusline.c +++ b/src/nvim/statusline.c @@ -909,25 +909,6 @@ int build_statuscol_str(win_T *wp, linenr_T lnum, long relnum, statuscol_T *stcp return width; } -/// Force a reset and re-estimation of the status column width. -/// -/// @param wp The window for which to reset the status column (can be NULL if "buf" is not) -/// @param buf The buffer for which to reset the status column (can be NULL) -void invalidate_statuscol(win_T *wp, buf_T *buf) -{ - if (buf != NULL) { - FOR_ALL_WINDOWS_IN_TAB(win, curtab) { - if (*win->w_p_stc != NUL && win->w_buffer == buf) { - win->w_nrwidth_line_count = 0; - win->w_statuscol_line_count = 0; - } - } - } else if (*wp->w_p_stc != NUL) { - wp->w_nrwidth_line_count = 0; // make sure width is reset - wp->w_statuscol_line_count = 0; // make sure width is re-estimated - } -} - /// Build a string from the status line items in "fmt". /// Return length of string in screen cells. /// |