mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 18:42:59 +03:00
enter insert fix
This commit is contained in:
parent
4b7701110e
commit
667e68626c
@ -117,9 +117,14 @@ async function main(args) {
|
|||||||
}
|
}
|
||||||
} else if (mode == "insert") {
|
} else if (mode == "insert") {
|
||||||
content = editLine(content, pos[1], line => line.slice(0, pos[0]) + event.char + line.slice(pos[0]))
|
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
|
pos[0] += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let res = await printScreen(screen_length, start_cursor, pos, content, mode, pos, 0, 0, width, height)
|
let res = await printScreen(screen_length, start_cursor, pos, content, mode, pos, 0, 0, width, height)
|
||||||
screen_length = res[0]
|
screen_length = res[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user