0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4091: virtcol is recomputed for statusline unnecessarily

Problem:    Virtcol is recomputed for statusline unnecessarily.
Solution:   Just use "w_virtcol". (closes #9523)
This commit is contained in:
zeertzjq
2022-01-14 20:11:38 +00:00
committed by Bram Moolenaar
parent 26ebf1f036
commit 0f112052ac
3 changed files with 12 additions and 9 deletions

View File

@@ -4610,15 +4610,7 @@ build_stl_str_hl(
case STL_VIRTCOL:
case STL_VIRTCOL_ALT:
// In list mode virtcol needs to be recomputed
virtcol = wp->w_virtcol;
if (wp->w_p_list && wp->w_lcs_chars.tab1 == NUL)
{
wp->w_p_list = FALSE;
getvcol(wp, &wp->w_cursor, NULL, &virtcol, NULL);
wp->w_p_list = TRUE;
}
++virtcol;
virtcol = wp->w_virtcol + 1;
// Don't display %V if it's the same as %c.
if (opt == STL_VIRTCOL_ALT
&& (virtcol == (colnr_T)(!(State & INSERT) && empty_line