aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/plines.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/plines.c')
-rw-r--r--src/nvim/plines.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/plines.c b/src/nvim/plines.c
index f59a1754f5..82554c7785 100644
--- a/src/nvim/plines.c
+++ b/src/nvim/plines.c
@@ -216,6 +216,7 @@ int win_lbr_chartabsize(chartabsize_T *cts, int *headp)
if (*s == NUL && !has_lcs_eol) {
size = 0; // NUL is not displayed
}
+ bool is_doublewidth = size == 2 && MB_BYTE2LEN((uint8_t)(*s)) > 1;
if (cts->cts_has_virt_text) {
int tab_size = size;
@@ -247,8 +248,7 @@ int win_lbr_chartabsize(chartabsize_T *cts, int *headp)
}
}
- if (size == 2 && MB_BYTE2LEN((uint8_t)(*s)) > 1
- && wp->w_p_wrap && in_win_border(wp, vcol)) {
+ if (is_doublewidth && wp->w_p_wrap && in_win_border(wp, vcol + size - 2)) {
// Count the ">" in the last column.
size++;
mb_added = 1;