HYL_OK3568_LINUX/buildroot/package/frecon/0007-Skip-drawing-when-cwidth-is-zero.patch
2025-05-10 21:49:39 +08:00

28 lines
734 B
Diff

From cdd62a22e8cea368d187c2deedd29c8aecba5243 Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Fri, 10 Jun 2022 17:15:12 +0800
Subject: [PATCH 7/9] Skip drawing when cwidth is zero
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
term.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/term.c b/term.c
index 4b24ff6..8ff698e 100644
--- a/term.c
+++ b/term.c
@@ -100,6 +100,9 @@ static int term_draw_cell(struct tsm_screen* screen, uint64_t id,
if (age && terminal->term->age && age <= terminal->term->age)
return 0;
+ if (!cwidth)
+ return 0;
+
if (terminal->background_valid) {
br = (terminal->background >> 16) & 0xFF;
bg = (terminal->background >> 8) & 0xFF;
--
2.20.1