summaryrefslogtreecommitdiffstats
path: root/src/charset.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-03 20:04:03 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-03 20:04:03 +0000
commit21efafe4c25373929979c72dc8aafa119f12dd8b (patch)
treef3fabbfba3e339c35a2567d2c61f1560793d491b /src/charset.c
parent0e1574c4069ded47c170fcd7a47a0df66693a5f4 (diff)
patch 8.2.4501: with 'showbreak' set cursor displayed in wrong positionv8.2.4501
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)
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/charset.c b/src/charset.c
index ed09bd23f4..836a9f6ecf 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -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;