Replies: 5 comments 1 reply
-
|
that location looks off. The empty document infers the height, font and whatnot from the current typing attributes, which is derived from the default font. if you do something like textView.font = NSFont.monospacedSystemFont(ofSize: 0, weight: .regular)that is, set default font, that should fix it. Nonetherless the problem is that if default font is not set, defaults gives unexpected result. That is something to be fixed here. |
Beta Was this translation helpful? Give feedback.
-
|
Ok so while I did test this with nothing customized, the screenshot actually has essentially that same thing set on it: textView.font = NSFont.monospacedSystemFont(ofSize: NSFont.systemFontSize, weight: .regular)I'm primarily going to be using it in AppKit and, as it stands, I won't be using I have the font being set before the text is set should be before any text is set, and this happens anytime I clear the text back to empty. I did some view hierarchy debugging and the line number view is the right height, but the number is just aligning its center vertically against the top of the row. |
Beta Was this translation helpful? Give feedback.
-
|
I only quickly checked on the demo project so maybe I'm missing something else. Can you share your setup? |
Beta Was this translation helpful? Give feedback.
-
|
Found the issue! I hadn't set a value to |
Beta Was this translation helpful? Give feedback.
-
|
Fixed |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I haven't tried on iOS, but on macOS with both SwiftUI and AppKit versions, if line numbers are enabled and the text is an empty string, the first (and only) line number is aligned weirdly and is cut off. No extra customization has been done.
Any ideas?
(P.S. I missed the checkbox before posting, but yes, I couldn't find mention of the same issue.)
Beta Was this translation helpful? Give feedback.
All reactions