Closed dankox closed 2 years ago
@monol33t so in the end I fixed also the problem with small view and created PR. Feel free to try and let us know if it works for you.
@dankox thank you, the solution for the first case works fine.
For the second case, I suggest decreasing origin position by x basis so that it creates illusion of freezing cursor when line length exceeds view width.
@monol33t I'm not sure if I understand. Right now it kinda creates this illusion of cursor freezing and just the line moving. Try the _examples/active.go
and v4 (editable)
view. Write a long line and when scrolling back with left arrow the cursor should stop 2 characters before the edge (unless there is no more characters in which case it should go to the edge).
Fixes #121
MoveCursor
should now move the cursor to the left and leave 2 more characters visible before it if possible. Fixes also problem when merging two lines by hitting backspace in the beginning of the previous line. The position wasn't updated correctly and didn't move the view to the cursor.