mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-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.
e73f911c53
This commit is contained in:
parent
157034bd6c
commit
c5db02d792
@ -2772,8 +2772,15 @@ win_line (
|
||||
if (wp->w_skipcol > 0)
|
||||
for (p_extra = extra; *p_extra == ' '; ++p_extra)
|
||||
*p_extra = '-';
|
||||
if (wp->w_p_rl) /* reverse line numbers */
|
||||
rl_mirror(extra);
|
||||
if (wp->w_p_rl) { // reverse line numbers
|
||||
// like rl_mirror(), but keep the space at the end
|
||||
char_u *p2 = skiptowhite(extra) - 1;
|
||||
for (char_u *p1 = extra; p1 < p2; p1++, p2--) {
|
||||
const int t = *p1;
|
||||
*p1 = *p2;
|
||||
*p2 = t;
|
||||
}
|
||||
}
|
||||
p_extra = extra;
|
||||
c_extra = NUL;
|
||||
c_final = NUL;
|
||||
|
@ -763,6 +763,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')
|
||||
|
Loading…
Reference in New Issue
Block a user