diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-01-27 08:35:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 08:35:52 +0100 |
commit | 0813b9fde456b991ee5e7ea8a9da2c21a09a13c1 (patch) | |
tree | fb889844e38ac95ad68e2aa485828541440e99ff /src/nvim/buffer.c | |
parent | d50dd1272550346164b05cfc82b3a0aea6dd6b84 (diff) | |
parent | 147f65373ecb5a5582d4cc0eb41ebc9a303181cc (diff) | |
download | rneovim-0813b9fde456b991ee5e7ea8a9da2c21a09a13c1.tar.gz rneovim-0813b9fde456b991ee5e7ea8a9da2c21a09a13c1.tar.bz2 rneovim-0813b9fde456b991ee5e7ea8a9da2c21a09a13c1.zip |
Merge pull request #17094 from zeertzjq/vim-8.2.4091
vim-patch:8.2.4091: virtcol is recomputed for statusline unnecessarily
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 0248d42f58..124ae8c719 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -4001,14 +4001,7 @@ int build_stl_str_hl(win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use case STL_VIRTCOL: case STL_VIRTCOL_ALT: { - // In list mode virtcol needs to be recomputed - colnr_T virtcol = wp->w_virtcol; - if (wp->w_p_list && wp->w_p_lcs_chars.tab1 == NUL) { - wp->w_p_list = false; - getvcol(wp, &wp->w_cursor, NULL, &virtcol, NULL); - wp->w_p_list = true; - } - virtcol++; + colnr_T 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 |