aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-06-17 22:00:26 -0400
committerGitHub <noreply@github.com>2021-06-17 22:00:26 -0400
commite2d3ad7bc4685c38f037a631ce345a64217c233b (patch)
tree26b2433a9c9bb9728aa0c5226997c6d74a28876c /src/nvim/testdir
parenta03ffe16023faab119cefe28a4f465c9de767afd (diff)
downloadrneovim-e2d3ad7bc4685c38f037a631ce345a64217c233b.tar.gz
rneovim-e2d3ad7bc4685c38f037a631ce345a64217c233b.tar.bz2
rneovim-e2d3ad7bc4685c38f037a631ce345a64217c233b.zip
vim-patch:8.2.3012: when 'rightleft' is set the line number is drawn reversed (#14839)
Problem: When 'rightleft' is set the line number is sometimes drawn reversed. Solution: Adjust how space is handled. (Christian Brabandt, closes vim/vim#8389, closes vim/vim#8391) https://github.com/vim/vim/commit/29f0dc3689eafcf7888e06d57d1cf79e62c5c148
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_number.vim25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_number.vim b/src/nvim/testdir/test_number.vim
index 81326bce14..eaabe3f67e 100644
--- a/src/nvim/testdir/test_number.vim
+++ b/src/nvim/testdir/test_number.vim
@@ -1,5 +1,6 @@
" Test for 'number' and 'relativenumber'
+source check.vim
source view_util.vim
func s:screen_lines(start, end) abort
@@ -263,3 +264,27 @@ func Test_relativenumber_uninitialised()
redraw
bwipe!
endfunc
+
+" Test for displaying line numbers with 'rightleft'
+func Test_number_rightleft()
+ CheckFeature rightleft
+ new
+ setlocal number
+ setlocal rightleft
+ call setline(1, range(1, 1000))
+ normal! 9Gzt
+ redraw!
+ call assert_match('^\s\+9 9$', Screenline(1))
+ normal! 10Gzt
+ redraw!
+ call assert_match('^\s\+01 10$', Screenline(1))
+ normal! 100Gzt
+ redraw!
+ call assert_match('^\s\+001 100$', Screenline(1))
+ normal! 1000Gzt
+ redraw!
+ call assert_match('^\s\+0001 1000$', Screenline(1))
+ bw!
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab