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

Changed the way text is rendered (Fixes: #47) #48

Closed mjarkk closed 3 years ago

mjarkk commented 4 years ago

This pr changes the way text is rendered.
The way text wrapping works right now supper buggy.
Beside that there are some really dumb calculations dune because some positions are based on the view offset what makes working with this a bit annoying.

I changed most positions in the view to be based on the lines and not the actual line wrappings what makes working with then much easier and less buggy.

mjarkk commented 4 years ago

@skanehira Can you re-check the wide char support?
I think it works but i don't have any keyboard chars to test it with, only copy and past from the internet.

@glvr182 sorry for the commit mess, lazygit pushed the merge changes to origin in-staid of my remote.

glvr182 commented 4 years ago

Code looks good, @skanehira if you could test this I'll accept the code.
As for the commits, can you reset head soft and push it all in one commit. You can do it like this:

git commit -s -m "View: Changed edit logics
 * thing you changed
 * thing you changed
"
mjarkk commented 4 years ago

I'm going to wait with merging this until the switch to TCell is dune, this pr changes quite a bit core logic and if we merge it now end users might have to change there code a bit 2 times.

C0DK commented 4 years ago

Cannot wait for this to be merged!

mjarkk commented 3 years ago

@glvr182 Should we also merge this in?
I've merged the master code and everything still seems to work fine.
Also moved the tcell changes markdown file to migrate-to-v1.md and added extra information about the changes in this PR

glvr182 commented 3 years ago

Sounds good! We can then test both the upgrade and this new method of rendering

mjarkk commented 3 years ago

A new beta release is up with the tcell and these changes,
v1.0.0-beta-2