mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 10:32:59 +03:00
fix backspace delete line wtf omg iaebaln
This commit is contained in:
parent
f4a7b7952a
commit
d2db0ee2e7
@ -81,10 +81,12 @@ 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 {
|
||||
if (pos[0] > 0) {
|
||||
pos[0]--
|
||||
} else {
|
||||
if (pos[1] > 0) {
|
||||
pos[1]--
|
||||
}
|
||||
}
|
||||
} else if (event.key == "Delete") {
|
||||
let index = axisToIndex(content.split("\n"), pos)
|
||||
|
Loading…
x
Reference in New Issue
Block a user