From 1ca52345545e3ff1700481159360933e4c4d002b Mon Sep 17 00:00:00 2001 From: Ale2610 Date: Mon, 31 Aug 2015 17:34:33 +0200 Subject: [PATCH] Update sms.lua --- src/apps/sms.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/apps/sms.lua b/src/apps/sms.lua index ff8b729..8b758fc 100644 --- a/src/apps/sms.lua +++ b/src/apps/sms.lua @@ -125,12 +125,15 @@ end local function recMsg() displayWin.setBackgroundColor(colors.white) displayWin.setTextColor(colors.black) - displayWin.clear() + displayWin.clear() local function printMsg(msg) - displayWin.setCursorBlink(false) - displayWin.setCursorPos(1,y) - displayWin.write(msg) - if y == my then displayWin.scroll(1) else y = y + 1 end + displayWin.setCursorBlink(false) + displayWin.setCursorPos(1,y) + local nTerm = term.current() + term.redirect(displayWin) + print(msg) + term.redirect(nTerm) + if y == my then displayWin.scroll(1) else y = y + 1 end end printMsg("Type /logout to exit") while true do