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

🐞 Line height decreases when no characters exist on line #20

Closed
0xWDG opened this issue Jun 11, 2022 · 11 comments
Closed

🐞 Line height decreases when no characters exist on line #20

0xWDG opened this issue Jun 11, 2022 · 11 comments
Labels
bug Something isn't working

Comments

@0xWDG
Copy link
Collaborator

0xWDG commented Jun 11, 2022

Description

The line height decreases if no characters exist on the line.

  • With no text
    image
  • With text
    image

Related issues

@lukepistrol lukepistrol added the bug Something isn't working label Jun 11, 2022
@austincondiff austincondiff changed the title Line height incorrect. 🐞 Line height incorrect. Jun 24, 2022
@ben-p-commits
Copy link
Contributor

@austincondiff , i'll take this one, I'm having fun poking at CETV lately :)

@lukepistrol
Copy link
Member

@ben-p-commits assigned it to you

@ben-p-commits
Copy link
Contributor

After doing some digging, I do see a code path for handling the empty text container case when laying out the STLineNumberRulerView in STTextView

image

I'm not seeing this bug in the sample app embedded in the dependency... a good sign we can fix this on our end.

@ben-p-commits
Copy link
Contributor

Also confirmed that pulling in the latest main branch work on STTextView doesn't address this.

@ben-p-commits
Copy link
Contributor

@krzyzanowskim - do you have any thoughts on how our usage of STTextView could be causing this?

I'm stumped. Not sure how our code is influencing this...

@austincondiff
Copy link
Collaborator

@ben-p-commits I believe the problem was caused when I decreased the font size of the line numbers. Because there is no text, the line collapses on the tallest item which is the smaller line number after removing the last character of the larger code. We may need a minimum height on each line or set the line height of the line number to be equal to the line height of the code.

@austincondiff austincondiff changed the title 🐞 Line height incorrect. 🐞 Line height decreases when no characters exist on line Feb 16, 2023
@luah5
Copy link
Member

luah5 commented Mar 29, 2023

a slight edit to #170 could fix this issue.

@austincondiff
Copy link
Collaborator

@luah5 Did you want to take this one then?

@luah5
Copy link
Member

luah5 commented Mar 29, 2023

@luah5 Did you want to take this one then?

i've barely looked into this but i'll take it, also CETV needs to be updated.

@luah5
Copy link
Member

luah5 commented Apr 25, 2023

This might have something to do with @Eliulm's message where he pointed out that the line height overlaps a bit.

@thecoolwinter
Copy link
Collaborator

This has been resolved with #211.

Screen.Recording.2023-12-09.at.3.09.04.PM.mov

austincondiff pushed a commit to austincondiff/CodeEditTextView that referenced this issue Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🏁 Complete
Development

No branches or pull requests

6 participants