diff --git a/app/kfc/kfc.js b/app/kfc/kfc.js index 166529c..9c582b1 100644 --- a/app/kfc/kfc.js +++ b/app/kfc/kfc.js @@ -68,7 +68,7 @@ async function main(args) { } else if (event.key == "ArrowLeft") { pos[0] = Math.max(0, pos[0] - 1) } else if (event.key == "ArrowRight") { - pos[0] = Math.min(content.split("\n")[y].length, pos[0] + 1) + pos[0] = Math.min(content.split("\n")[pos[1]].length, pos[0] + 1) } else if (event.key == "Escape") { mode = "normal" } else if (event.key == "Insert") {