aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2021-12-24 08:06:26 +0800
committerzeertzjq <zeertzjq@outlook.com>2021-12-24 08:06:26 +0800
commitbc75544facbf200fc7a7d519c0963ec1becfa508 (patch)
treee5319e2f4c883ae13abc8f72729fe1abb3b5e26a /src/nvim/screen.c
parent0d7a97224f28cdf47d7ecc80b6d300c8c67c0b29 (diff)
downloadrneovim-bc75544facbf200fc7a7d519c0963ec1becfa508.tar.gz
rneovim-bc75544facbf200fc7a7d519c0963ec1becfa508.tar.bz2
rneovim-bc75544facbf200fc7a7d519c0963ec1becfa508.zip
fix(screen): truncate double-width character correctly
The `c = '>';` is useless here, because it is not used later. `u8c` should also need to be set to '>', and `u8cc` needs to be cleared.
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index a938a3b062..df911a1228 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -5933,6 +5933,8 @@ void grid_puts_len(ScreenGrid *grid, char_u *text, int textlen, int row, int col
// Only 1 cell left, but character requires 2 cells:
// display a '>' in the last column to avoid wrapping. */
c = '>';
+ u8c = '>';
+ u8cc[0] = 0;
mbyte_cells = 1;
}