mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 10:32:59 +03:00
cursor when backspace fix
This commit is contained in:
parent
31762b74a2
commit
f4a7b7952a
@ -81,6 +81,11 @@ async function main(args) {
|
||||
if (event.key == "Backspace") {
|
||||
let index = axisToIndex(content.split("\n"), pos)
|
||||
content = content.slice(0, index - 1) + content.slice(index)
|
||||
if (pos[0] == 0 && pos[1] > 0) {
|
||||
pos[1]--
|
||||
} else {
|
||||
pos[0]--
|
||||
}
|
||||
} else if (event.key == "Delete") {
|
||||
let index = axisToIndex(content.split("\n"), pos)
|
||||
content = content.slice(0, index) + content.slice(index + 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user