Open obrien-chris opened 7 years ago
I think we can generalize the problems to 2 core issues: the functions startOfLine, endOfLine and delete on the start of a line
Yes; @robinvd is correct; I'll let you guys work through on this one, but to give you a place to start I'd recommend implementing some new variant of startOfLine
and endOfLine
which depend on Coord
s instead of newlines 👍; startOfLine will be a bit easier, so try that one first 😁
Remaining issues are:
A
on last line doesn't go 'past' the last character,o
on last line carries the last characterx
and Backspace are still broken on empty lines.You are forgetting the Backspace on the start of the line. I think the issue is that moveByN (-1) doesnt travel past lines. Maybe we need a function that just moves in a 2 dimensional space over the text
Each of these keys don't work as intended at certain points in the document:
Normal Mode
Insert Mode
[ ] Backspace -- At the start of any line will Backspace will delete any text to the right of the cursor, then once the line is empty will cause the cursor to disappear on that line and delete the line beneath it.
[ ] x -- Will delete empty lines.