]> granicus.if.org Git - vim/commitdiff
patch 8.0.0745: multi-byte characters in a terminal don't display well v8.0.0745
authorBram Moolenaar <Bram@vim.org>
Sat, 22 Jul 2017 16:14:17 +0000 (18:14 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 22 Jul 2017 16:14:17 +0000 (18:14 +0200)
Problem:    multi-byte characters in a terminal window are not displayed
            properly.
Solution:   Set the unused screen characters. (Yasuhiro Matsumoto, closes
            #1857)

src/terminal.c
src/version.c

index 0d974eddbe4551d4c1295f00ddd267814497fe07..aafd7e89fa4a810844f9dfebc148030f500ac12b 100644 (file)
@@ -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;
index 31dc8d6822b153270b022fa3633dcada659c9af4..b0058e4d3e800fb700df00fae158e0fbc4adbe61 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    745,
 /**/
     744,
 /**/