Mirror of the Vim source from https://github.com/vim/vim
リビジョン | 5858c00d0f2c47b395e3c63cc809ee667f8c02a4 (tree) |
---|---|
日時 | 2006-10-10 05:11:17 |
作者 | vimboss |
コミッター | vimboss |
updated for version 7.0-122
@@ -5079,15 +5079,38 @@ | ||
5079 | 5079 | * character too. If we didn't skip any blanks above, then we |
5080 | 5080 | * only redraw if the character wasn't already redrawn anyway. |
5081 | 5081 | */ |
5082 | - if (gui.in_use && (col > startCol || !redraw_this) | |
5083 | -# ifdef FEAT_MBYTE | |
5084 | - && enc_dbcs == 0 | |
5085 | -# endif | |
5086 | - ) | |
5082 | + if (gui.in_use && (col > startCol || !redraw_this)) | |
5087 | 5083 | { |
5088 | 5084 | hl = ScreenAttrs[off_to]; |
5089 | 5085 | if (hl > HL_ALL || (hl & HL_BOLD)) |
5090 | - screen_char(off_to - 1, row, col + coloff - 1); | |
5086 | + { | |
5087 | + int prev_cells = 1; | |
5088 | +# ifdef FEAT_MBYTE | |
5089 | + if (enc_utf8) | |
5090 | + /* for utf-8, ScreenLines[char_offset + 1] == 0 means | |
5091 | + * that its width is 2. */ | |
5092 | + prev_cells = ScreenLines[off_to - 1] == 0 ? 2 : 1; | |
5093 | + else if (enc_dbcs != 0) | |
5094 | + { | |
5095 | + /* find previous character by counting from first | |
5096 | + * column and get its width. */ | |
5097 | + unsigned off = LineOffset[row]; | |
5098 | + | |
5099 | + while (off < off_to) | |
5100 | + { | |
5101 | + prev_cells = (*mb_off2cells)(off); | |
5102 | + off += prev_cells; | |
5103 | + } | |
5104 | + } | |
5105 | + | |
5106 | + if (enc_dbcs != 0 && prev_cells > 1) | |
5107 | + screen_char_2(off_to - prev_cells, row, | |
5108 | + col + coloff - prev_cells); | |
5109 | + else | |
5110 | +# endif | |
5111 | + screen_char(off_to - prev_cells, row, | |
5112 | + col + coloff - prev_cells); | |
5113 | + } | |
5091 | 5114 | } |
5092 | 5115 | #endif |
5093 | 5116 | screen_fill(row, row + 1, col + coloff, clear_width + coloff, |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 122, | |
671 | +/**/ | |
670 | 672 | 121, |
671 | 673 | /**/ |
672 | 674 | 120, |