jroimartin / gocui

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

Bug fix: `v.MoveCursor` with dx < -1 or dx > 1 does not work if origin needs to be adjusted #114

Closed rlisagor closed 7 years ago

rlisagor commented 7 years ago

The existing logic moves the origin by 1 in either direction. The new logic adjusts the origin by the appropriate amount, and moves the cursor to the beginning or end of the line.

Please let me know what you think or if you'd like me to make any changes.

jroimartin commented 7 years ago

Merged via d1b6db5a496f9164cb7370873d31063ab4885ef8. Thanks! :)