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

patch 8.2.4929: off-by-one error in in statusline item

Problem:    Off-by-one error in in statusline item.
Solution:   Subtrace one less. (closes #10394, closes #5599)
This commit is contained in:
LemonBoy
2022-05-09 21:03:47 +01:00
committed by Bram Moolenaar
parent 6ed545e797
commit 57ff52677b
4 changed files with 28 additions and 2 deletions

View File

@@ -4446,7 +4446,8 @@ build_stl_str_hl(
// correct the start of the items for the truncation
for (l = stl_groupitem[groupdepth] + 1; l < curitem; l++)
{
stl_items[l].stl_start -= n;
// Minus one for the leading '<' added above.
stl_items[l].stl_start -= n - 1;
if (stl_items[l].stl_start < t)
stl_items[l].stl_start = t;
}