Mercurial > vim
comparison src/screen.c @ 17427:45c1dc353321 v8.1.1712
patch 8.1.1712: signs in number column cause text to be misaligned
commit https://github.com/vim/vim/commit/d6bcff457799e491c3d27880858ec08e758e1849
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 18 12:48:16 2019 +0200
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 https://github.com/vim/vim/issues/4694)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 18 Jul 2019 13:00:06 +0200 |
parents | a513b81d3689 |
children | 967e2ee9b656 |
comparison
equal
deleted
inserted
replaced
17426:4240f8ba788f | 17427:45c1dc353321 |
---|---|
3118 *pp_extra = sattr->text; | 3118 *pp_extra = sattr->text; |
3119 if (*pp_extra != NULL) | 3119 if (*pp_extra != NULL) |
3120 { | 3120 { |
3121 if (nrcol) | 3121 if (nrcol) |
3122 { | 3122 { |
3123 sprintf((char *)extra, "%*s ", number_width(wp), | 3123 int n, width = number_width(wp) - 2; |
3124 *pp_extra); | 3124 |
3125 for (n = 0; n < width; n++) | |
3126 extra[n] = ' '; | |
3127 extra[n] = 0; | |
3128 STRCAT(extra, *pp_extra); | |
3129 STRCAT(extra, " "); | |
3125 *pp_extra = extra; | 3130 *pp_extra = extra; |
3126 } | 3131 } |
3127 *c_extrap = NUL; | 3132 *c_extrap = NUL; |
3128 *c_finalp = NUL; | 3133 *c_finalp = NUL; |
3129 *n_extrap = (int)STRLEN(*pp_extra); | 3134 *n_extrap = (int)STRLEN(*pp_extra); |