Closed ghost closed 2 years ago
I'm not quite sure if I understand. When I'm erasing character with backspace the cursor is in front of such character. If it's in the beginning of the line the cursor move the the end of line before which I can see (unless it's not wrapping and the line extends out of the visible screen/terminal).
I can also see the character under the cursor (which the cursor is on top). So I'm not really sure what is required. Could you maybe provide some videos/gifs to better show the problem and maybe the solution which is probably in other terminal applications?
unless it's not wrapping and the line extends out of the visible screen/terminal
This
1 and 3 gifs show current behaviour, 2 and 4 desirable , in my opinion.
Oh I see what you mean. Yeah, that's a problem.
The first one is actually a bug. It should move to that location, but because it's updating the coordinates directly and not using MoveCursor
it doesn't update view origin correctly.
The second one is a bit tricky though. I've created a quick fix for now, which you can test by getting gocui
from here:
https://github.com/dankox/gocui/tree/fix/move-cursor-when-no-wrap
It's working for me, but there is still one thing which I need to resolve and that is when the view's width is 1 character, it doesn't display correctly (or not the same way as before this fix). So I need to address that and then I will create PR. But if you would be able to confirm that this works for you, that would be great.
Describe the feature you'd like Pressing Backspace doesn't let me see what character I'm erasing if the cursor were at the start of a line or somewhere in the middle.
Describe alternatives you've considered Origin position follows cursor position in the above cases.