CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

🐞 Terminal Rendering Defect

Open austincondiff opened this issue 3 years ago β€’ 17 comments

Description

image
  • The bottom line seems to extend further than it should.
  • Vertical alignment of characters is slightly off in comparison to Terminal.app
  • Resizing window causes artifacts

To Reproduce

n/a

Expected behavior

image

Version information

CodeEdit: 1.0 Hash: c947d4065290862e415688c062af1788919eaf1a MacOS: 12.3.1 (21E258) Xcode: 13.3.1 (13E500a)

Additional context

n/a

austincondiff avatar May 16 '22 18:05 austincondiff

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

ghost avatar May 17 '22 16:05 ghost

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.

austincondiff avatar May 17 '22 16:05 austincondiff

@austincondiff thanks

ghost avatar May 17 '22 16:05 ghost

@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.

ghost avatar May 17 '22 21:05 ghost

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

lilingxi01 avatar May 17 '22 23:05 lilingxi01

@lilingxi01 πŸ‘

ghost avatar May 17 '22 23:05 ghost

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

jevonmao avatar May 18 '22 20:05 jevonmao

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

image

austincondiff avatar May 18 '22 20:05 austincondiff

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

jevonmao avatar May 18 '22 22:05 jevonmao

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

austincondiff avatar May 18 '22 22:05 austincondiff

@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.

ghost avatar May 18 '22 23:05 ghost

Yes that worked!

jevonmao avatar May 18 '22 23:05 jevonmao

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

ghost avatar May 18 '22 23:05 ghost

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

lukepistrol avatar May 19 '22 13:05 lukepistrol

@lukepistrol I'll do that now

ghost avatar May 19 '22 13:05 ghost

@maxsuaudeau Please reference it here if you can

austincondiff avatar May 19 '22 13:05 austincondiff

@austincondiff sure

ghost avatar May 19 '22 13:05 ghost

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

migueldeicaza avatar Feb 17 '23 14:02 migueldeicaza

@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 avatar Feb 17 '23 15:02 austincondiff

Should be resolved once #1117 is merged

lukepistrol avatar Mar 07 '23 15:03 lukepistrol