diff --git a/app/kfc/kfc.js b/app/kfc/kfc.js index 222ec3c..8e5af11 100644 --- a/app/kfc/kfc.js +++ b/app/kfc/kfc.js @@ -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") {