changeset 11725:22cef8face93 v8.0.0745

patch 8.0.0745: multi-byte characters in a terminal don't display well commit https://github.com/vim/vim/commit/9f1f49b839fbc5d099301d5318a5e1e70dd59b7c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 22 18:14:17 2017 +0200 patch 8.0.0745: multi-byte characters in a terminal don't display well Problem: multi-byte characters in a terminal window are not displayed properly. Solution: Set the unused screen characters. (Yasuhiro Matsumoto, closes #1857)
author Christian Brabandt <cb@256bit.org>
date Sat, 22 Jul 2017 18:15:05 +0200
parents c42efe3dfc13
children a18dff800264
files src/terminal.c src/version.c
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -46,6 +46,7 @@
  *   - Display the scrollback buffer (but with attributes).
  *     Make the buffer not modifiable, drop attributes when making changes.
  * - when closing window and job has not ended, make terminal hidden?
+ * - don't allow exiting Vim when a terminal is still running a job
  * - use win_del_lines() to make scroll-up efficient.
  * - command line completion for :terminal
  * - add test for giving error for invalid 'termsize' value.
@@ -629,9 +630,15 @@ term_update_window(win_T *wp)
 		{
 #if defined(FEAT_MBYTE)
 		    if (enc_utf8 && c >= 0x80)
+		    {
+			ScreenLines[off] = ' ';
 			ScreenLinesUC[off] = c;
+		    }
 		    else
+		    {
 			ScreenLines[off] = c;
+			ScreenLinesUC[off] = NUL;
+		    }
 #else
 		    ScreenLines[off] = c;
 #endif
@@ -643,7 +650,7 @@ term_update_window(win_T *wp)
 		++off;
 		if (cell.width == 2)
 		{
-		    ScreenLines[off] = ' ';
+		    ScreenLines[off] = NUL;
 		    ScreenLinesUC[off] = NUL;
 		    ++pos.col;
 		    ++off;
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    745,
+/**/
     744,
 /**/
     743,