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

Wrap content if too long #21

Closed rakoo closed 10 years ago

rakoo commented 10 years ago

Continuation of #20 on v0.2-dev.

This was surprisingly straightforward. And, indeed, having the view automatically redraw on resize is wonderful.

Minor caveat: if the prefix is itself bigger than the width of the view, it is not wrapped... which I consider to be ok (this case shouldn't happen that often)

rakoo commented 10 years ago

Note: I removed x >=0 and y >=0 because it's always true.

jroimartin commented 10 years ago

Applied. I fixed a couple of minor bugs:

Thank you very much for your contribution! :)

rakoo commented 10 years ago

Nice !