mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 18:42:59 +03:00
fix getterminalsize
This commit is contained in:
parent
4109fbd0e0
commit
beb6220348
@ -22,9 +22,9 @@ async function main(args) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
writeStdout(event.key + "\n")
|
writeStdout(event + "\n")
|
||||||
} else if (event.type == "char") {
|
} else if (event.type == "char") {
|
||||||
writeStdout(event.char + "\n")
|
writeStdout(event + "\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ var last_stdin_length = 0
|
|||||||
|
|
||||||
function getTerminalSize() {
|
function getTerminalSize() {
|
||||||
return [
|
return [
|
||||||
Math.floor(window.innerWidth - CURSOR_OFFSET[0] * 2 / CHAR_SIZE[0]),
|
Math.floor((window.innerWidth - CURSOR_OFFSET[0] * 2) / CHAR_SIZE[0]),
|
||||||
Math.floor(window.innerHeight - CURSOR_OFFSET[1] * 2 / CHAR_SIZE[1])
|
Math.floor((window.innerHeight - CURSOR_OFFSET[1] * 2) / CHAR_SIZE[1])
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user