diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-03-24 17:12:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-03-24 17:12:19 +0100 |
commit | 6383b92d8c272f75d1fe144f75e2e35ad7e11b04 (patch) | |
tree | 7bbb696a73c68b405eb0264aa585ff6d99853bb7 | |
parent | f11ce667b06ffb7447fb55638a04b5fa5cfe29a0 (diff) | |
download | vim-git-6383b92d8c272f75d1fe144f75e2e35ad7e11b04.tar.gz |
updated for version 7.4.679v7.4.679
Problem: Color values greater than 255 cause problems on MS-Windows.
Solution: Truncate to 255 colors. (Yasuhiro Matsumoto)
-rw-r--r-- | src/os_win32.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index f4d43442d..b50ab95eb 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -5262,7 +5262,7 @@ gotoxy( static void textattr(WORD wAttr) { - g_attrCurrent = wAttr; + g_attrCurrent = wAttr & 0xff; SetConsoleTextAttribute(g_hConOut, wAttr); } @@ -5271,7 +5271,7 @@ textattr(WORD wAttr) static void textcolor(WORD wAttr) { - g_attrCurrent = (g_attrCurrent & 0xf0) + wAttr; + g_attrCurrent = (g_attrCurrent & 0xf0) + (wAttr & 0x0f); SetConsoleTextAttribute(g_hConOut, g_attrCurrent); } @@ -5280,7 +5280,7 @@ textcolor(WORD wAttr) static void textbackground(WORD wAttr) { - g_attrCurrent = (g_attrCurrent & 0x0f) + (wAttr << 4); + g_attrCurrent = (g_attrCurrent & 0x0f) + ((wAttr & 0x0f) << 4); SetConsoleTextAttribute(g_hConOut, g_attrCurrent); } diff --git a/src/version.c b/src/version.c index ddd8e0453..a43522eee 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 679, +/**/ 678, /**/ 677, |