comparison src/buffer.c @ 28811:bd5b6ac5998f v8.2.4929

patch 8.2.4929: off-by-one error in in statusline item Commit: https://github.com/vim/vim/commit/57ff52677bf5ba1651281ffe40505df8feba4a36 Author: LemonBoy <thatlemon@gmail.com> Date: Mon May 9 21:03:47 2022 +0100 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 https://github.com/vim/vim/issues/10394, closes https://github.com/vim/vim/issues/5599)
author Bram Moolenaar <Bram@vim.org>
date Mon, 09 May 2022 22:15:03 +0200
parents d770568e6c98
children 2d0bd5601c30
comparison
equal deleted inserted replaced
28810:b8850d9e3e6e 28811:bd5b6ac5998f
4444 MB_CHAR2BYTES(fillchar, p); 4444 MB_CHAR2BYTES(fillchar, p);
4445 4445
4446 // correct the start of the items for the truncation 4446 // correct the start of the items for the truncation
4447 for (l = stl_groupitem[groupdepth] + 1; l < curitem; l++) 4447 for (l = stl_groupitem[groupdepth] + 1; l < curitem; l++)
4448 { 4448 {
4449 stl_items[l].stl_start -= n; 4449 // Minus one for the leading '<' added above.
4450 stl_items[l].stl_start -= n - 1;
4450 if (stl_items[l].stl_start < t) 4451 if (stl_items[l].stl_start < t)
4451 stl_items[l].stl_start = t; 4452 stl_items[l].stl_start = t;
4452 } 4453 }
4453 } 4454 }
4454 else if (abs(stl_items[stl_groupitem[groupdepth]].stl_minwid) > l) 4455 else if (abs(stl_items[stl_groupitem[groupdepth]].stl_minwid) > l)