From e0504467b11ca122d76d7a5bf0dc66451ac8f293 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 20 Sep 2025 21:29:50 -0400 Subject: kern: cons: Constantly update ch x/y in loop If we do not do this, we'll get stale x/y values the the characters will never advance position when using multichar strings Signed-off-by: Ian Moffett --- src/sys/io/cons/cons.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sys/io/cons/cons.c b/src/sys/io/cons/cons.c index aab5778..d9ebb5c 100644 --- a/src/sys/io/cons/cons.c +++ b/src/sys/io/cons/cons.c @@ -179,12 +179,13 @@ cons_putstr(struct cons_scr *scr, const char *str, size_t len) ch.bg = scr->scr_bg; ch.fg = scr->scr_fg; - ch.y = scr->text_y; - ch.x = scr->text_x; spinlock_acquire(&scr->lock); for (size_t i = 0; i < len; ++i) { + ch.y = scr->text_y; + ch.x = scr->text_x; ch.c = str[i]; + if (cons_handle_spec(scr, ch.c) == ch.c) { continue; } -- cgit v1.2.3