commit 53af02adbad049f5fc24540cc0f38fa4f9aadf58
parent 55dc482e757e1d8f7713daa61a2deddfdaca4e42
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sat, 31 Aug 2024 09:06:34 +0800
refactor(plines): correct double-width condition (#30200)
To check for a non-ASCII character, the condition should be >= 0x80, not
> 0x80. In this case it doesn't really matter as the 0x80 character is
unprintable and occupies 4 cells, but still make it consistent.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nvim/plines.c b/src/nvim/plines.c
@@ -147,7 +147,7 @@ CharSize charsize_regular(CharsizeArg *csarg, char *const cur, colnr_T const vco
size = kInvalidByteCells;
} else {
size = ptr2cells(cur);
- is_doublewidth = size == 2 && cur_char > 0x80;
+ is_doublewidth = size == 2 && cur_char >= 0x80;
}
if (csarg->virt_row >= 0) {