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 #4694)
diff --git a/src/testdir/test_signs.vim b/src/testdir/test_signs.vim
index 1b9a29d..3d885d6 100644
--- a/src/testdir/test_signs.vim
+++ b/src/testdir/test_signs.vim
@@ -1766,6 +1766,7 @@
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 @@
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