From ea62cee85e9e77ec86edd9843926dadb69978753 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 19 Feb 2023 18:36:41 +0000 Subject: patch 9.0.1327: cursor in wrong position below line with virtual text below Problem: Cursor in wrong position below line with virtual text below ending in multi-byte character. Solution: When checking for last character take care of multi-byte character. --- src/charset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/charset.c') diff --git a/src/charset.c b/src/charset.c index a8c20f9eb3..d8feb4eadc 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1196,7 +1196,7 @@ win_lbr_chartabsize( || (tp->tp_col == MAXCOL && ((tp->tp_flags & TP_FLAG_ALIGN_ABOVE) ? col == 0 - : (s[0] == NUL || s[1] == NUL) + : (s[0] == NUL || s[charlen] == NUL) && cts->cts_with_trailing))) && -tp->tp_id - 1 < gap->ga_len) { -- cgit v1.2.3