try to wordwrap, but failed

This commit is contained in:
2025-10-12 22:31:35 +08:00
parent bd8e1f9b8d
commit 0ccafa2e2e
7 changed files with 188 additions and 69 deletions

View File

@@ -332,8 +332,9 @@ function drawNode(
? node.textContent()
: node.textContent;
term.setTextColor(textColor ?? colors.white);
term.setBackgroundColor(bgColor ?? colors.black);
if (bgColor !== undefined) {
term.setBackgroundColor(bgColor);
}
term.setCursorPos(x, y);
term.write(text.substring(0, width));
}