mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 10:32:59 +03:00
fix cursor up down x pos
This commit is contained in:
parent
667e68626c
commit
0e9f074814
@ -69,8 +69,10 @@ async function main(args) {
|
||||
|
||||
} else if (event.key == "ArrowUp") {
|
||||
pos[1] = Math.max(0, pos[1] - 1)
|
||||
pos[0] = Math.min(content.split("\n")[pos[1]].length, pos[0])
|
||||
} else if (event.key == "ArrowDown") {
|
||||
pos[1] = Math.min(content.split("\n").length-1, pos[1] + 1)
|
||||
pos[0] = Math.min(content.split("\n")[pos[1]].length, pos[0])
|
||||
} else if (event.key == "ArrowLeft") {
|
||||
pos[0] = Math.max(0, pos[0] - 1)
|
||||
} else if (event.key == "ArrowRight") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user