forked from aniani/vim
patch 9.1.0601: Wrong cursor position with 'breakindent' when wide char doesn't fit
Problem: Wrong cursor position with 'breakindent' when a double-width
character doesn't fit in a screen line (mikoto2000)
Solution: Include the width of the 'breakindent' properly.
(zeertzjq)
fixes: #15289
closes: #15290
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
99984fc58a
commit
b5d6b5caac
@@ -1397,17 +1397,17 @@ win_lbr_chartabsize(
|
||||
else if (max_head_vcol > vcol + head_prev + prev_rem)
|
||||
head += (max_head_vcol - (vcol + head_prev + prev_rem)
|
||||
+ width2 - 1) / width2 * head_mid;
|
||||
# ifdef FEAT_PROP_POPUP
|
||||
else if (max_head_vcol < 0)
|
||||
{
|
||||
int off = 0;
|
||||
int off = mb_added;
|
||||
# ifdef FEAT_PROP_POPUP
|
||||
if (*s != NUL
|
||||
&& ((State & MODE_NORMAL) || cts->cts_start_incl))
|
||||
off += cts->cts_cur_text_width;
|
||||
# endif
|
||||
if (off >= prev_rem)
|
||||
head += (1 + (off - prev_rem) / width) * head_mid;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user