arrow right fix

This commit is contained in:
MeexReay 2025-03-21 21:42:14 +03:00
parent e55f3149f5
commit a1dee4f220

View File

@ -68,7 +68,7 @@ async function main(args) {
} else if (event.key == "ArrowLeft") { } else if (event.key == "ArrowLeft") {
pos[0] = Math.max(0, pos[0] - 1) pos[0] = Math.max(0, pos[0] - 1)
} else if (event.key == "ArrowRight") { } else if (event.key == "ArrowRight") {
pos[0] = Math.min(content.split("\n")[y].length - 1, pos[0] + 1) pos[0] = Math.min(content.split("\n")[y].length, pos[0] + 1)
} else if (event.key == "Escape") { } else if (event.key == "Escape") {
mode = "normal" mode = "normal"
} else if (event.key == "Insert") { } else if (event.key == "Insert") {