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

🐞 Terminal edges bleed if height is not a multiple of the line height #615

Closed
austincondiff opened this issue May 16, 2022 · 20 comments · Fixed by #1117
Closed

🐞 Terminal edges bleed if height is not a multiple of the line height #615

austincondiff opened this issue May 16, 2022 · 20 comments · Fixed by #1117
Labels
bug Something isn't working

Comments

@austincondiff
Copy link
Collaborator

austincondiff commented May 16, 2022

Description

The bottom line seems to bleed to the edge if the terminal view height is not an even multiple of the terminal text line height.

image

To Reproduce

Resize the terminal in between multiples of the line height and you will see color bleeding for characters that take up the full height.

Expected behavior

image

Potential solution

We might solve this by "snapping" the terminal view height to only multiples of the terminal text line height per @migueldeicaza's comment below.

@austincondiff austincondiff added the bug Something isn't working label May 16, 2022
@ghost
Copy link

ghost commented May 17, 2022

@austincondiff could you provide a more in-detail description and what you did to get this error? That would help me fix it.

@austincondiff
Copy link
Collaborator Author

Simply open the integrated terminal. If you have any kind of background to your line like in powerline, you will see some stretching at the bottom.

@ghost
Copy link

ghost commented May 17, 2022

@austincondiff thanks

@ghost
Copy link

ghost commented May 17, 2022

@austincondiff I was looking inside the source files for the TerminalEmulator but couldn't seem to find lines of code that seemed related to this bug.

@lilingxi01
Copy link
Member

@SwiftUILabs : UI Bugs could be tricky at all time. I will take a glimpse of it when I am free.

@ghost
Copy link

ghost commented May 17, 2022

@lilingxi01 👍

@jevonmao
Copy link

@austincondiff How do you open the terminal? I don't see it anywhere in the UI.

@austincondiff
Copy link
Collaborator Author

austincondiff commented May 18, 2022

@jevonmao To open the terminal click the rectangular symbol at the bottom right of the window.

image

@jevonmao
Copy link

I don't have the bottom bar, building with main branch.

@austincondiff
Copy link
Collaborator Author

@jevonmao Can you post a screenshot of what you are seeing?

@ghost
Copy link

ghost commented May 18, 2022

@austincondiff I think he didn't open the full-featured UI by opening a file and not a folder. @jevonmao Unfortunately I couldn't make a tutorial, my Xcode is updating. Instead, I added step-by-step instructions below.

  1. Build the project.
  2. If you have turned off the welcome view in CodeEdit settings, then turn it on.
  3. Once you see the welcome view (if you don't, rebuild the project), click on "open an existing file or folder."
  4. You should see a popup Finder window for you to select a file. Don't select a file, select a folder. For example, if you were working on an app in Xcode prior to this, then you can open that folder.
  5. You should see the full-featured UI now. If not, please tell me and I will help you.

@jevonmao
Copy link

Yes that worked!

@ghost
Copy link

ghost commented May 18, 2022

@jevonmao Good to hear. Have fun using the app!

@lukepistrol
Copy link
Member

@SwiftUILabs The issue lies somewhere within SwiftTerm - the library TerminalEmulator relies on. Feel free to open an issue on their repo.

@ghost
Copy link

ghost commented May 19, 2022

@lukepistrol I'll do that now

@austincondiff
Copy link
Collaborator Author

austincondiff commented May 19, 2022

@maxsuaudeau Please reference it here if you can

@ghost
Copy link

ghost commented May 19, 2022

@austincondiff sure

@stale stale bot added the wontfix This will not be worked on label Jul 18, 2022
@CodeEditApp CodeEditApp deleted a comment from stale bot Jul 18, 2022
@stale stale bot removed the wontfix This will not be worked on label Jul 18, 2022
@austincondiff austincondiff moved this from 🆕 New to 🚧 Blocked in CodeEdit Project Feb 17, 2023
@migueldeicaza
Copy link

Hello folks,

Would love to track each of these rendering defects in SwiftTerm independently.

I can give some guidance on the first one about “bleeding”. This is sadly a choice, I am also a fan of not bleeding, but as you can see in the history or commits and bugs, it is not a settler problem: some like it one way, some like it the other.

one solution to please everyone is to snap the window size to the character sizes, so there is no room for bleeding or for drawing with the background character. This is not always possible, but it is something that you might want to look into.

There are some band aids that could help, like changing the rendering code to always draw at the bottom; and that could help for console sessions but would trigger the bug on top for full screen apps or apps using colors on top.

As for the other issues, would love to track those separately. I am gone for the next 10 days, but can look at those when I am back

@austincondiff
Copy link
Collaborator Author

austincondiff commented Feb 17, 2023

@migueldeicaza Snapping is a great idea even if we snap the contained view instead of the resizable drawer itself.

We would just need to get the height of its container and see how many whole line heights will go into it. Then we would just multiply that number by the line height and set that height to the contained terminal view.

About everything else, as mentioned, we are in no hurry and can wait until you have time. Thanks!

@austincondiff austincondiff changed the title 🐞 Terminal Rendering Defect 🐞 Terminal edges bleed if height is not a multiple of the line height Feb 18, 2023
@austincondiff austincondiff moved this from 🚧 Blocked to 📋 Todo in CodeEdit Project Feb 18, 2023
@lukepistrol
Copy link
Member

Should be resolved once #1117 is merged

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

Successfully merging a pull request may close this issue.

5 participants