Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function printReceivedMessage(message: MessageEvent, callsign: string): Promise {
const pos: { x: number, y: number } = await term.getCursorLocation()
if (pos) {
term.moveTo(0, pos.y)
term.insertLine(1)
printStyledText(message)
term.move(pos.x - 1, 0)
if (term.height === pos.y) {
if (input) {
// term.moveTo(0, term.height)
term.moveTo(0, term.height)
myColorFunction(`${callsign}`)(': ')
input.redraw()
}
}
}
}
function move(lines) {
term.move(0, lines);
lineNum += lines;
// status('Line number: ' + lineNum);
}