awesome-gocui / gocui

Minimalist Go package aimed at creating Console User Interfaces.
BSD 3-Clause "New" or "Revised" License
344 stars 39 forks source link

[BUG] MoveCursor moves beyond line end #63

Closed w6ipa closed 3 years ago

w6ipa commented 4 years ago

Describe the bug When the cursor is on the last character of a line, and v.MoveCursor(1,0,false) is executed, the cursor position (returned by v.Cursor) is equal to then len of the line, which is out of bound. To Reproduce See above

Expected behavior When v.MoveCursor(1,0,false) is executed and the x is equal to the last index of the line, y should be increase, and x reset to 0. The happens correctly the next execution of v.MoveCursor(1,0,false). Screenshots NA Environment (please complete the following information): MacOS 10.14

Additional context NA

mjarkk commented 3 years ago

We just released 2 beta releases and in one of them we changed the way text is rendered and how the cursor works.
Are you open to trying out v1.0.0-beta-2 it might have solved this issue?

mjarkk commented 3 years ago

As there is no comment and meanwhile we've released v1.0.0 i suspect this is no longer an issue