mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.3.553
Problem: With double-width characters and 'listchars' containing "precedes" the text is displayed one cell off. Solution: Check for double-width character being overwritten by the "precedes" character. (Yasuhiro Matsumoto)
This commit is contained in:
14
src/screen.c
14
src/screen.c
@@ -89,6 +89,9 @@
|
|||||||
|
|
||||||
#include "vim.h"
|
#include "vim.h"
|
||||||
|
|
||||||
|
#define MB_FILLER_CHAR '<' /* character used when a double-width character
|
||||||
|
* doesn't fit. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The attributes that are actually active for writing to the screen.
|
* The attributes that are actually active for writing to the screen.
|
||||||
*/
|
*/
|
||||||
@@ -4016,7 +4019,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
|
|||||||
if (n_skip > 0 && mb_l > 1 && n_extra == 0)
|
if (n_skip > 0 && mb_l > 1 && n_extra == 0)
|
||||||
{
|
{
|
||||||
n_extra = 1;
|
n_extra = 1;
|
||||||
c_extra = '<';
|
c_extra = MB_FILLER_CHAR;
|
||||||
c = ' ';
|
c = ' ';
|
||||||
if (area_attr == 0 && search_attr == 0)
|
if (area_attr == 0 && search_attr == 0)
|
||||||
{
|
{
|
||||||
@@ -4576,6 +4579,15 @@ win_line(wp, lnum, startrow, endrow, nochange)
|
|||||||
c = lcs_prec;
|
c = lcs_prec;
|
||||||
lcs_prec_todo = NUL;
|
lcs_prec_todo = NUL;
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
|
if (has_mbyte && (*mb_char2cells)(mb_c) > 1)
|
||||||
|
{
|
||||||
|
/* Double-width character being overwritten by the "precedes"
|
||||||
|
* character, need to fill up half the character. */
|
||||||
|
c_extra = MB_FILLER_CHAR;
|
||||||
|
n_extra = 1;
|
||||||
|
n_attr = 2;
|
||||||
|
extra_attr = hl_attr(HLF_AT);
|
||||||
|
}
|
||||||
mb_c = c;
|
mb_c = c;
|
||||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||||
{
|
{
|
||||||
|
@@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
553,
|
||||||
/**/
|
/**/
|
||||||
552,
|
552,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user