kfc fix damn

This commit is contained in:
MeexReay 2025-03-22 17:28:06 +03:00
parent e8a1bcb8ad
commit 199a656c1a

View File

@ -19,8 +19,8 @@ async function cropToScreen(text, x, y, width, height) {
async function printScreen(screen_length, start_cursor, pos, content, mode, pos, x, y, width, height) {
trimTerminal(screen_length)
let screen = await cropToScreen(content, 0, 0, width, height - 1)
await writeStdout(makeColorCodesPrintable(screen))
let screen = makeColorCodesPrintable(await cropToScreen(content, x, y, width, height - 1))
await writeStdout(screen)
let status_line = `\nmode: ${mode} | size: ${content.length} | lines: ${content.split("\n").length} | x: ${pos[0]} | y: ${pos[1]}`
await writeStdout(status_line)
setCursor(start_cursor[0] + pos[0], start_cursor[1] + pos[1])