From 53af02adbad049f5fc24540cc0f38fa4f9aadf58 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 31 Aug 2024 09:06:34 +0800 Subject: 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. --- src/nvim/plines.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/plines.c b/src/nvim/plines.c index 408fe26bf3..ae6d16b0cd 100644 --- 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) { -- cgit