mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 10:32:59 +03:00
fix remove lines 3 time
This commit is contained in:
parent
d2db0ee2e7
commit
fd45ace05d
@ -79,6 +79,9 @@ async function main(args) {
|
||||
|
||||
if (event.type == "key") {
|
||||
if (event.key == "Backspace") {
|
||||
if (pos[0] == 0 && pos[1] == 0) {
|
||||
continue
|
||||
}
|
||||
let index = axisToIndex(content.split("\n"), pos)
|
||||
content = content.slice(0, index - 1) + content.slice(index)
|
||||
if (pos[0] > 0) {
|
||||
@ -86,6 +89,7 @@ async function main(args) {
|
||||
} else {
|
||||
if (pos[1] > 0) {
|
||||
pos[1]--
|
||||
pos[0] = content.split("\n")[pos[1]].length
|
||||
}
|
||||
}
|
||||
} else if (event.key == "Delete") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user