summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2022-05-09 21:03:47 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-09 21:03:47 +0100
commit57ff52677bf5ba1651281ffe40505df8feba4a36 (patch)
tree3c657ec985fabf158175925c607f507221de4ef9 /src/buffer.c
parent6ed545e79735f23ff8e650bc2f0967e5a0baedc9 (diff)
patch 8.2.4929: off-by-one error in in statusline itemv8.2.4929
Problem: Off-by-one error in in statusline item. Solution: Subtrace one less. (closes #10394, closes #5599)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 17b1493800..35711f5feb 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -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;
}