comparison 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
comparison
equal deleted inserted replaced
17426:4240f8ba788f 17427:45c1dc353321
1764 " number column and line number is not displayed. 1764 " number column and line number is not displayed.
1765 set numberwidth=2 1765 set numberwidth=2
1766 set number 1766 set number
1767 set signcolumn=number 1767 set signcolumn=number
1768 sign define sign1 text==> 1768 sign define sign1 text==>
1769 sign define sign2 text=V
1769 sign place 10 line=1 name=sign1 1770 sign place 10 line=1 name=sign1
1770 redraw! 1771 redraw!
1771 call assert_equal("=> 01234", s:ScreenLine(1, 1, 8)) 1772 call assert_equal("=> 01234", s:ScreenLine(1, 1, 8))
1772 1773
1773 " With 'signcolumn' set to 'number', when there is no sign, make sure line 1774 " With 'signcolumn' set to 'number', when there is no sign, make sure line
1844 " the number column width increases 1845 " the number column width increases
1845 sign place 30 line=1 name=sign1 1846 sign place 30 line=1 name=sign1
1846 redraw! 1847 redraw!
1847 call assert_equal("=> 01234", s:ScreenLine(1, 1, 8)) 1848 call assert_equal("=> 01234", s:ScreenLine(1, 1, 8))
1848 call assert_equal(" 2 abcde", s:ScreenLine(2, 1, 8)) 1849 call assert_equal(" 2 abcde", s:ScreenLine(2, 1, 8))
1850 " Add sign with multi-byte text
1851 set numberwidth=4
1852 sign place 40 line=2 name=sign2
1853 redraw!
1854 call assert_equal(" => 01234", s:ScreenLine(1, 1, 9))
1855 call assert_equal(" V abcde", s:ScreenLine(2, 1, 9))
1849 1856
1850 sign unplace * group=* 1857 sign unplace * group=*
1851 sign undefine sign1 1858 sign undefine sign1
1852 set signcolumn& 1859 set signcolumn&
1853 set number& 1860 set number&