enter insert fix

This commit is contained in:
MeexReay 2025-03-21 21:53:13 +03:00
parent 4b7701110e
commit 667e68626c

View File

@ -117,9 +117,14 @@ async function main(args) {
}
} else if (mode == "insert") {
content = editLine(content, pos[1], line => line.slice(0, pos[0]) + event.char + line.slice(pos[0]))
if (event.char == "\n") {
pos[1] += 1
pos[0] = 0
} else {
pos[0] += 1
}
}
}
let res = await printScreen(screen_length, start_cursor, pos, content, mode, pos, 0, 0, width, height)
screen_length = res[0]