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:
parent
8ee4c01b8c
commit
e73f911c53
14
src/screen.c
14
src/screen.c
@ -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;
|
||||
|
20
src/testdir/dumps/Test_diff_of_diff_02.dump
Normal file
20
src/testdir/dumps/Test_diff_of_diff_02.dump
Normal 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
|
@ -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')
|
||||
|
@ -775,6 +775,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1073,
|
||||
/**/
|
||||
1072,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user