Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Dec 24, 2020

Conversation

mjarkk
Copy link
Member

@mjarkk mjarkk commented Oct 25, 2019

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.

edit.go Outdated Show resolved Hide resolved
edit.go Outdated Show resolved Hide resolved
edit.go Outdated Show resolved Hide resolved
@mjarkk mjarkk marked this pull request as ready for review October 26, 2019 15:39
@mjarkk
Copy link
Member Author

mjarkk commented Oct 26, 2019

@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
Copy link
Member

glvr182 commented Oct 30, 2019

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
"

@glvr182 glvr182 added the enhancement New feature or request label Oct 30, 2019
Most positions are now based on the lines instaid of the actual view.
This removes a lot of complicated code because we don't have to worry anymore about the view offset.

Improved line wrapping by a lot no wired cursor movement anymore.
@mjarkk
Copy link
Member Author

mjarkk commented Nov 15, 2019

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
Copy link

C0DK commented Jan 27, 2020

Cannot wait for this to be merged!

@mjarkk
Copy link
Member Author

mjarkk commented Dec 23, 2020

@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
Copy link
Member

glvr182 commented Dec 24, 2020

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

@mjarkk mjarkk merged commit c6cc4e8 into awesome-gocui:master Dec 24, 2020
@mjarkk
Copy link
Member Author

mjarkk commented Dec 24, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants