mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 8.0.0380: with 'linebreak' double wide char wraps badly
Problem: With 'linebreak' set and 'breakat' includes ">" a double-wide character results in "<<" displayed. Solution: Check for the character not to be replaced. (Ozaki Kiichi, closes #1456)
This commit is contained in:
@@ -4189,6 +4189,8 @@ win_line(
|
||||
}
|
||||
else
|
||||
{
|
||||
int c0;
|
||||
|
||||
if (p_extra_free != NULL)
|
||||
{
|
||||
vim_free(p_extra_free);
|
||||
@@ -4197,7 +4199,7 @@ win_line(
|
||||
/*
|
||||
* Get a character from the line itself.
|
||||
*/
|
||||
c = *ptr;
|
||||
c0 = c = *ptr;
|
||||
#ifdef FEAT_MBYTE
|
||||
if (has_mbyte)
|
||||
{
|
||||
@@ -4214,7 +4216,7 @@ win_line(
|
||||
/* Overlong encoded ASCII or ASCII with composing char
|
||||
* is displayed normally, except a NUL. */
|
||||
if (mb_c < 0x80)
|
||||
c = mb_c;
|
||||
c0 = c = mb_c;
|
||||
mb_utf8 = TRUE;
|
||||
|
||||
/* At start of the line we can have a composing char.
|
||||
@@ -4538,7 +4540,8 @@ win_line(
|
||||
/*
|
||||
* Found last space before word: check for line break.
|
||||
*/
|
||||
if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr))
|
||||
if (wp->w_p_lbr && c0 == c
|
||||
&& vim_isbreak(c) && !vim_isbreak(*ptr))
|
||||
{
|
||||
# ifdef FEAT_MBYTE
|
||||
int mb_off = has_mbyte ? (*mb_head_off)(line, ptr - 1) : 0;
|
||||
|
Reference in New Issue
Block a user