0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.1.1073: space in number column is on wrong side with 'rightleft' set

Problem:    Space in number column is on wrong side with 'rightleft' set.
Solution:   Move the space to the text side.  Add a test.
This commit is contained in:
Bram Moolenaar 2019-03-29 18:29:54 +01:00
parent 8ee4c01b8c
commit e73f911c53
4 changed files with 38 additions and 1 deletions

View File

@ -3896,7 +3896,19 @@ win_line(
*p_extra = '-';
#ifdef FEAT_RIGHTLEFT
if (wp->w_p_rl) /* reverse line numbers */
rl_mirror(extra);
{
char_u *p1, *p2;
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;
*p2 = t;
}
}
#endif
p_extra = extra;
c_extra = NUL;

View File

@ -0,0 +1,20 @@
| +0&#ffffff0@28|a>a| +0#af5f00255&|1| @1| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0@1| @32
@29|b@1| +0#af5f00255&|2| @1| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0@1| @32
@29|c@1| +0#af5f00255&|3| @1| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0@1| @32
|-+0#4040ff13#afffff255@30| +0#af5f00255#ffffff0@3| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|@+0#0000000#5fd7ff255@1| |-|3|,|2| |+|5|,|7| |@@1| @19
|-+0#4040ff13#afffff255@30| +0#af5f00255#ffffff0@3| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255@1| @32
|-+0#4040ff13#afffff255@30| +0#af5f00255#ffffff0@3| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|e+0#0000000#5fd7ff255@1| @32
|-+0#4040ff13#afffff255@30| +0#af5f00255#ffffff0@3| +0#0000e05#a8a8a8255@1||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|f+0#0000000#5fd7ff255@1| @32
| +0#4040ff13#ffffff0@35|~||+1#0000000&|~+0#4040ff13&| @35
@36|~||+1#0000000&|~+0#4040ff13&| @35
@36|~||+1#0000000&|~+0#4040ff13&| @35
@36|~||+1#0000000&|~+0#4040ff13&| @35
@36|~||+1#0000000&|~+0#4040ff13&| @35
@36|~||+1#0000000&|~+0#4040ff13&| @35
@36|~||+1#0000000&|~+0#4040ff13&| @35
@36|~||+1#0000000&|~+0#4040ff13&| @35
@36|~||+1#0000000&|~+0#4040ff13&| @35
@36|~||+1#0000000&|~+0#4040ff13&| @35
@36|~||+1#0000000&|~+0#4040ff13&| @35
|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|A|l@1
|:+0&&|s|e|t| |r|i|g|h|t|l|e|f|t| @60

View File

@ -922,6 +922,9 @@ func Test_diff_of_diff()
call VerifyScreenDump(buf, 'Test_diff_of_diff_01', {})
call term_sendkeys(buf, ":set rightleft\<cr>")
call VerifyScreenDump(buf, 'Test_diff_of_diff_02', {})
" clean up
call StopVimInTerminal(buf)
call delete('Xtest_diff_diff')

View File

@ -775,6 +775,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1073,
/**/
1072,
/**/