comparison src/message.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 5995db0fe84a
children 0016cba920ef
comparison
equal deleted inserted replaced
20781:93e66f657101 20782:c4bce986c31a
1750 int len = (*mb_ptr2len)(str); 1750 int len = (*mb_ptr2len)(str);
1751 1751
1752 // For multi-byte characters check for an illegal byte. 1752 // For multi-byte characters check for an illegal byte.
1753 if (has_mbyte && MB_BYTE2LEN(*str) > len) 1753 if (has_mbyte && MB_BYTE2LEN(*str) > len)
1754 { 1754 {
1755 transchar_nonprint(buf, c); 1755 transchar_nonprint(curbuf, buf, c);
1756 *sp = str + 1; 1756 *sp = str + 1;
1757 return buf; 1757 return buf;
1758 } 1758 }
1759 // Since 'special' is TRUE the multi-byte character 'c' will be 1759 // Since 'special' is TRUE the multi-byte character 'c' will be
1760 // processed by get_special_key_name() 1760 // processed by get_special_key_name()