How to use the terminal-kit.terminal.move function in terminal-kit

To help you get started, we’ve selected a few terminal-kit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brannondorsey / chattervox / src / ui / chat.ts View on Github external
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()
            }
        }
    }
}
github sjurba / rebase-editor / lib / editor.js View on Github external
function move(lines) {
  term.move(0, lines);
  lineNum += lines;
  // status('Line number: ' + lineNum);
}