summaryrefslogtreecommitdiffstats
path: root/src/message.c
diff options
context:
space:
mode:
authorcero1988 <mirkoceroni@mirkoceroni.it>2023-02-16 15:03:12 +0000
committerBram Moolenaar <Bram@vim.org>2023-02-16 15:03:12 +0000
commit1d87e11a1ef201b26ed87585fba70182ad0c468a (patch)
tree283b5f6b6856a18af08196375d4613a8303148d8 /src/message.c
parentce3189d56e867a2ffc077893b62f530d5b09150f (diff)
patch 9.0.1314: :messages behavior depends on 'fileformat' of current bufferv9.0.1314
Problem: :messages behavior depends on 'fileformat' of current buffer. Solution: Pass the buffer pointer to where it is used. (Mirko Ceroni, closes #11995)
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/message.c b/src/message.c
index b8e5eb95f2..18f3013805 100644
--- a/src/message.c
+++ b/src/message.c
@@ -902,7 +902,7 @@ internal_error_no_abort(char *where)
void
emsg_invreg(int name)
{
- semsg(_(e_invalid_register_name_str), transchar(name));
+ semsg(_(e_invalid_register_name_str), transchar_buf(NULL, name));
}
#if defined(FEAT_EVAL) || defined(PROTO)
@@ -1601,7 +1601,7 @@ msg_outtrans_one(char_u *p, int attr)
msg_outtrans_len_attr(p, l, attr);
return p + l;
}
- msg_puts_attr((char *)transchar_byte(*p), attr);
+ msg_puts_attr((char *)transchar_byte_buf(NULL, *p), attr);
return p + 1;
}
@@ -1658,7 +1658,7 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
msg_puts_attr_len((char *)plain_start,
(int)(str - plain_start), attr);
plain_start = str + mb_l;
- msg_puts_attr((char *)transchar(c),
+ msg_puts_attr((char *)transchar_buf(NULL, c),
attr == 0 ? HL_ATTR(HLF_8) : attr);
retval += char2cells(c);
}
@@ -1667,7 +1667,7 @@ msg_outtrans_len_attr(char_u *msgstr, int len, int attr)
}
else
{
- s = transchar_byte(*str);
+ s = transchar_byte_buf(NULL, *str);
if (s[1] != NUL)
{
// unprintable char: print the printable chars so far and the
@@ -1753,7 +1753,7 @@ msg_outtrans_special(
text = (char *)str2special(&str, from, FALSE);
if (text[0] != NUL && text[1] == NUL)
// single-byte character or illegal byte
- text = (char *)transchar_byte((char_u)text[0]);
+ text = (char *)transchar_byte_buf(NULL, (char_u)text[0]);
len = vim_strsize((char_u *)text);
if (maxlen > 0 && retval + len >= maxlen)
break;
@@ -2021,7 +2021,7 @@ msg_prt_line(char_u *s, int list)
else if (c != NUL && (n = byte2cells(c)) > 1)
{
n_extra = n - 1;
- p_extra = transchar_byte(c);
+ p_extra = transchar_byte_buf(NULL, c);
c_extra = NUL;
c_final = NUL;
c = *p_extra++;