summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/screen.c9
-rw-r--r--src/testdir/test_signs.vim7
-rw-r--r--src/version.c2
3 files changed, 16 insertions, 2 deletions
diff --git a/src/screen.c b/src/screen.c
index 825b7ab0e..fdb1e0af5 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3120,8 +3120,13 @@ get_sign_display_info(
{
if (nrcol)
{
- sprintf((char *)extra, "%*s ", number_width(wp),
- *pp_extra);
+ int n, width = number_width(wp) - 2;
+
+ for (n = 0; n < width; n++)
+ extra[n] = ' ';
+ extra[n] = 0;
+ STRCAT(extra, *pp_extra);
+ STRCAT(extra, " ");
*pp_extra = extra;
}
*c_extrap = NUL;
diff --git a/src/testdir/test_signs.vim b/src/testdir/test_signs.vim
index 1b9a29d9f..3d885d642 100644
--- a/src/testdir/test_signs.vim
+++ b/src/testdir/test_signs.vim
@@ -1766,6 +1766,7 @@ func Test_sign_numcol()
set number
set signcolumn=number
sign define sign1 text==>
+ sign define sign2 text=V
sign place 10 line=1 name=sign1
redraw!
call assert_equal("=> 01234", s:ScreenLine(1, 1, 8))
@@ -1846,6 +1847,12 @@ func Test_sign_numcol()
redraw!
call assert_equal("=> 01234", s:ScreenLine(1, 1, 8))
call assert_equal(" 2 abcde", s:ScreenLine(2, 1, 8))
+ " Add sign with multi-byte text
+ set numberwidth=4
+ sign place 40 line=2 name=sign2
+ redraw!
+ call assert_equal(" => 01234", s:ScreenLine(1, 1, 9))
+ call assert_equal(" V abcde", s:ScreenLine(2, 1, 9))
sign unplace * group=*
sign undefine sign1
diff --git a/src/version.c b/src/version.c
index 6c6550b09..a6d1492e2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -778,6 +778,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1712,
+/**/
1711,
/**/
1710,