From 8222e2485f40db26aa6755e3096c2b91a99a098b Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 23 May 2015 00:12:25 +0100 Subject: [PATCH] trs80: still trying to fix tty switch --- Kernel/platform-trs80/devtty.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Kernel/platform-trs80/devtty.c b/Kernel/platform-trs80/devtty.c index 338d7365..284446eb 100644 --- a/Kernel/platform-trs80/devtty.c +++ b/Kernel/platform-trs80/devtty.c @@ -98,9 +98,15 @@ void tty_putc(uint8_t minor, unsigned char c) else { irq = di(); if (curtty != minor -1) { + /* Kill the cursor as we are changing the memory buffers. If + we don't do this the next cursor_off will hit the wrong + buffer */ + cursor_off(); vt_save(&ttysave[curtty]); curtty = minor - 1; vt_load(&ttysave[curtty]); + /* Fix up the cursor */ + cursor_on(ttysave[curtty].cursory, ttysave[curtty].cursorx); } vtoutput(&c, 1); irqrestore(irq); -- 2.34.1