Mercurial > vim
comparison src/terminal.c @ 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 | 1922710ee8fa |
children | cb1dc90d22cc |
comparison
equal
deleted
inserted
replaced
11724:c42efe3dfc13 | 11725:22cef8face93 |
---|---|
44 * - Put the terminal contents in the scrollback buffer. | 44 * - Put the terminal contents in the scrollback buffer. |
45 * - Free the terminal emulator. | 45 * - Free the terminal emulator. |
46 * - Display the scrollback buffer (but with attributes). | 46 * - Display the scrollback buffer (but with attributes). |
47 * Make the buffer not modifiable, drop attributes when making changes. | 47 * Make the buffer not modifiable, drop attributes when making changes. |
48 * - when closing window and job has not ended, make terminal hidden? | 48 * - when closing window and job has not ended, make terminal hidden? |
49 * - don't allow exiting Vim when a terminal is still running a job | |
49 * - use win_del_lines() to make scroll-up efficient. | 50 * - use win_del_lines() to make scroll-up efficient. |
50 * - command line completion for :terminal | 51 * - command line completion for :terminal |
51 * - add test for giving error for invalid 'termsize' value. | 52 * - add test for giving error for invalid 'termsize' value. |
52 * - support minimal size when 'termsize' is "rows*cols". | 53 * - support minimal size when 'termsize' is "rows*cols". |
53 * - support minimal size when 'termsize' is empty? | 54 * - support minimal size when 'termsize' is empty? |
627 } | 628 } |
628 else | 629 else |
629 { | 630 { |
630 #if defined(FEAT_MBYTE) | 631 #if defined(FEAT_MBYTE) |
631 if (enc_utf8 && c >= 0x80) | 632 if (enc_utf8 && c >= 0x80) |
633 { | |
634 ScreenLines[off] = ' '; | |
632 ScreenLinesUC[off] = c; | 635 ScreenLinesUC[off] = c; |
636 } | |
633 else | 637 else |
638 { | |
634 ScreenLines[off] = c; | 639 ScreenLines[off] = c; |
640 ScreenLinesUC[off] = NUL; | |
641 } | |
635 #else | 642 #else |
636 ScreenLines[off] = c; | 643 ScreenLines[off] = c; |
637 #endif | 644 #endif |
638 } | 645 } |
639 /* TODO: use cell.attrs and colors */ | 646 /* TODO: use cell.attrs and colors */ |
641 | 648 |
642 ++pos.col; | 649 ++pos.col; |
643 ++off; | 650 ++off; |
644 if (cell.width == 2) | 651 if (cell.width == 2) |
645 { | 652 { |
646 ScreenLines[off] = ' '; | 653 ScreenLines[off] = NUL; |
647 ScreenLinesUC[off] = NUL; | 654 ScreenLinesUC[off] = NUL; |
648 ++pos.col; | 655 ++pos.col; |
649 ++off; | 656 ++off; |
650 } | 657 } |
651 } | 658 } |