diff src/testdir/test_signs.vim @ 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 9843fbfa0ee5
children 313f498c646e
line wrap: on
line diff
--- 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