0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -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;