diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-20 21:29:50 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-20 21:29:50 -0400 |
commit | e0504467b11ca122d76d7a5bf0dc66451ac8f293 (patch) | |
tree | 9b4b4c97a05d2bae4a3c2b2f212b60b66a3d54a8 /src/sys/io | |
parent | 954389acc4fdda1b6dbd3e9c3cf6d5767af40a84 (diff) |
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 <ian@osmora.org>
Diffstat (limited to 'src/sys/io')
-rw-r--r-- | src/sys/io/cons/cons.c | 5 |
1 files 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; } |