comparison src/drawline.c @ 20782:c4bce986c31a v8.2.0943

patch 8.2.0943: displaying ^M or ^J depends on current buffer Commit: https://github.com/vim/vim/commit/32ee627750e8b7b3fa6516b893e72f6e6af54710 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 10 14:16:49 2020 +0200 patch 8.2.0943: displaying ^M or ^J depends on current buffer Problem: Displaying ^M or ^J depends on current buffer. Solution: Pass the displayed buffer to transchar(). (closes https://github.com/vim/vim/issues/6225)
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Jun 2020 14:30:04 +0200
parents 8c98c74176ac
children 802bf80bcfe4
comparison
equal deleted inserted replaced
20781:93e66f657101 20782:c4bce986c31a
1762 { 1762 {
1763 if (ptr[1] == NUL) 1763 if (ptr[1] == NUL)
1764 { 1764 {
1765 // head byte at end of line 1765 // head byte at end of line
1766 mb_l = 1; 1766 mb_l = 1;
1767 transchar_nonprint(extra, c); 1767 transchar_nonprint(wp->w_buffer, extra, c);
1768 } 1768 }
1769 else 1769 else
1770 { 1770 {
1771 // illegal tail byte 1771 // illegal tail byte
1772 mb_l = 2; 1772 mb_l = 2;
2222 else 2222 else
2223 mb_utf8 = FALSE; // don't draw as UTF-8 2223 mb_utf8 = FALSE; // don't draw as UTF-8
2224 } 2224 }
2225 else if (c != NUL) 2225 else if (c != NUL)
2226 { 2226 {
2227 p_extra = transchar(c); 2227 p_extra = transchar_buf(wp->w_buffer, c);
2228 if (n_extra == 0) 2228 if (n_extra == 0)
2229 n_extra = byte2cells(c) - 1; 2229 n_extra = byte2cells(c) - 1;
2230 #ifdef FEAT_RIGHTLEFT 2230 #ifdef FEAT_RIGHTLEFT
2231 if ((dy_flags & DY_UHEX) && wp->w_p_rl) 2231 if ((dy_flags & DY_UHEX) && wp->w_p_rl)
2232 rl_mirror(p_extra); // reverse "<12>" 2232 rl_mirror(p_extra); // reverse "<12>"