vim-patch:8.1.1712: signs in number column cause text to be misaligned

Problem:    Signs in number column cause text to be misaligned.
Solution:   Improve alignment. (Yasuhiro Matsumoto, closes vim/vim#4694)
d6bcff4577
This commit is contained in:
erw7
2020-07-14 05:13:26 +09:00
committed by Shougo Matsushita
parent bfe94d0a08
commit 6b521ceeaf
2 changed files with 14 additions and 2 deletions

View File

@@ -4518,8 +4518,13 @@ static void get_sign_display_info(
*c_finalp = NUL;
if (nrcol) {
snprintf((char *)extra, extra_size, "%-*s ",
number_width(wp), *pp_extra);
int n, width = number_width(wp) - 2;
for (n = 0; n < width; n++) {
extra[n] = ' ';
}
extra[n] = NUL;
STRCAT(extra, *pp_extra);
STRCAT(extra, " ");
*pp_extra = extra;
*n_extrap = (int)STRLEN(*pp_extra);
} else {