From 0f112052acaeffd75b7eb001eeb8a246ad12a276 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 14 Jan 2022 20:11:38 +0000 Subject: patch 8.2.4091: virtcol is recomputed for statusline unnecessarily Problem: Virtcol is recomputed for statusline unnecessarily. Solution: Just use "w_virtcol". (closes #9523) --- src/buffer.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 3445b204f3..08db0fc28e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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 -- cgit v1.2.3