Patch 8.2.3012
Problem:    When 'rightleft' is set the line number is sometimes drawn
            reversed.
Solution:   Adjust how space is handled. (Christian Brabandt, closes #8389,
            closes #8391)
Files:      src/drawline.c, src/testdir/test_number.vim


*** ../vim-8.2.3011/src/drawline.c      2021-05-29 17:56:33.833094008 +0200
--- src/drawline.c      2021-06-16 19:24:18.933264835 +0200
***************
*** 1121,1128 ****
                            int         t;
  
                            // like rl_mirror(), but keep the space at the end
!                           p2 = skiptowhite(extra) - 1;
!                           for (p1 = extra; p1 < p2; ++p1, --p2)
                            {
                                t = *p1;
                                *p1 = *p2;
--- 1121,1129 ----
                            int         t;
  
                            // like rl_mirror(), but keep the space at the end
!                           p2 = skipwhite(extra);
!                           p2 = skiptowhite(p2) - 1;
!                           for (p1 = skipwhite(extra); p1 < p2; ++p1, --p2)
                            {
                                t = *p1;
                                *p1 = *p2;
*** ../vim-8.2.3011/src/testdir/test_number.vim 2020-08-12 18:50:31.883655785 
+0200
--- src/testdir/test_number.vim 2021-06-16 19:24:18.933264835 +0200
***************
*** 298,301 ****
--- 298,323 ----
    call delete('XTest_relnr')
  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
*** ../vim-8.2.3011/src/version.c       2021-06-16 19:19:44.870445048 +0200
--- src/version.c       2021-06-16 19:27:20.972588635 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     3012,
  /**/

-- 
The process for understanding customers primarily involves sitting around with
other marketing people and talking about what you would to if you were dumb
enough to be a customer.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202106161729.15GHT4OH1431514%40masaka.moolenaar.net.

Raspunde prin e-mail lui