From 4642759489a76b4158176ac9211ab83d86824437 Mon Sep 17 00:00:00 2001 From: edyfox Date: Wed, 17 Jan 2007 00:53:34 +0000 Subject: [PATCH] Patch 7.0.185 Problem: Multi-byte characters in a message are displayed with attributes from what comes before it. Solution: Don't use the attributes for a multi-byte character. Do use attributes for special characters. (Yukihiro Nakadaira) Files: src/message.c git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/vim7@202 2a77ed30-b011-0410-a7ad-c7884a0aa172 --- src/message.c | 9 ++++++--- src/version.c | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/message.c b/src/message.c index 2eee6044..0c40823a 100644 --- a/src/message.c +++ b/src/message.c @@ -1556,7 +1556,7 @@ msg_prt_line(s, list) int c_extra = 0; char_u *p_extra = NULL; /* init to make SASC shut up */ int n; - int attr= 0; + int attr = 0; char_u *trail = NULL; #ifdef FEAT_MBYTE int l; @@ -1581,7 +1581,7 @@ msg_prt_line(s, list) while (!got_int) { - if (n_extra) + if (n_extra > 0) { --n_extra; if (c_extra) @@ -1595,7 +1595,7 @@ msg_prt_line(s, list) col += (*mb_ptr2cells)(s); mch_memmove(buf, s, (size_t)l); buf[l] = NUL; - msg_puts_attr(buf, attr); + msg_puts(buf); s += l; continue; } @@ -1635,6 +1635,9 @@ msg_prt_line(s, list) p_extra = transchar_byte(c); c_extra = NUL; c = *p_extra++; + /* Use special coloring to be able to distinguish from + * the same in plain text. */ + attr = hl_attr(HLF_8); } else if (c == ' ' && trail != NULL && s > trail) { diff --git a/src/version.c b/src/version.c index d4c093a8..cb266270 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 185, +/**/ 184, /**/ 183, -- 2.11.4.GIT