0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position

Problem:    With 'showbreak' set and after the end of the line the cursor
            may be displayed in the wrong position.
Solution:   Do not apply 'showbreak' after the end of the line. (closes #9884)
This commit is contained in:
Bram Moolenaar
2022-03-03 20:04:03 +00:00
parent 0e1574c406
commit 21efafe4c2
4 changed files with 32 additions and 1 deletions

View File

@@ -1037,9 +1037,10 @@ win_lbr_chartabsize(
* May have to add something for 'breakindent' and/or 'showbreak'
* string at start of line.
* Set *headp to the size of what we add.
* Do not use 'showbreak' at the NUL after the text.
*/
added = 0;
sbr = get_showbreak_value(wp);
sbr = c == NUL ? empty_option : get_showbreak_value(wp);
if ((*sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && col != 0)
{
colnr_T sbrlen = 0;