From d1abd6513e95a41e41ad570038310087e97f3bb1 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 6 Oct 2019 08:03:47 -0400 Subject: vim-patch:8.1.0586: :digraph output is not easy to read Problem: :digraph output is not easy to read. Solution: Add highlighting for :digraphs. (Marcin Szamotulski, closes vim/vim#3572) Also add section headers for :digraphs!. https://github.com/vim/vim/commit/eae8ae1b2b4e532b125077d9838b70d966891be3 --- src/nvim/message.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/nvim/message.c') diff --git a/src/nvim/message.c b/src/nvim/message.c index 30e906cd5f..b518664f32 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -238,7 +238,7 @@ void msg_multiline_attr(const char *s, int attr, bool check_int) if (next_spec != NULL) { // Printing all char that are before the char found by strpbrk - msg_outtrans_len_attr((char_u *)s, next_spec - s, attr); + msg_outtrans_len_attr((const char_u *)s, next_spec - s, attr); if (*next_spec != TAB) { msg_clr_eos(); @@ -1384,12 +1384,12 @@ int msg_outtrans(char_u *str) return msg_outtrans_attr(str, 0); } -int msg_outtrans_attr(char_u *str, int attr) +int msg_outtrans_attr(const char_u *str, int attr) { return msg_outtrans_len_attr(str, (int)STRLEN(str), attr); } -int msg_outtrans_len(char_u *str, int len) +int msg_outtrans_len(const char_u *str, int len) { return msg_outtrans_len_attr(str, len, 0); } @@ -1402,7 +1402,7 @@ char_u *msg_outtrans_one(char_u *p, int attr) { int l; - if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1) { + if ((l = utfc_ptr2len(p)) > 1) { msg_outtrans_len_attr(p, l, attr); return p + l; } @@ -1410,7 +1410,7 @@ char_u *msg_outtrans_one(char_u *p, int attr) return p + 1; } -int msg_outtrans_len_attr(char_u *msgstr, int len, int attr) +int msg_outtrans_len_attr(const char_u *msgstr, int len, int attr) { int retval = 0; const char *str = (const char *)msgstr; -- cgit