Skip to content

🐞 Text styling and syntax highlighting are very unreliable #162

@nkleemann

Description

@nkleemann

Description

Text styling (both color and font) sometimes won't get applied after pasting, or typing in text.

Sometimes, the styling get's applied when I scroll the EditorView, that's why you can see my scroll a few times in the screen recording. It's not working though..

I say "sometimes" because I can't always reproduce it, and I've found no other correlations. This bug occurs roughly 3 out of 5 times trying to paste, or type, text into the editor view.

This is my EditorTheme (same thing happens with black on white btw, but still):

@State var theme = EditorTheme(
        text: .white,
        insertionPoint: .white,
        invisibles: .gray,
        background: .black,
        lineHighlight: .init(white: 0.2, alpha: 0.6),
        selection: .blue,
        keywords: .systemPink,
        commands: .systemPink,
        types: .systemMint,
        attributes: .systemTeal,
        variables: .systemMint,
        values: .systemOrange,
        numbers: .systemCyan,
        strings: .systemRed,
        characters: .systemRed,
        comments: .systemGreen
)

To Reproduce

  1. Use the basic Example provided in the README
  2. Paste in code blocks, or try to type in text at the bottom of the editor view.

Expected Behavior

Upon entering any text into the editor view it should get processed and styled immediately.

Version Information

CodeEditTextView: 0.4.0
macOS: 13.2.1
Xcode: 14.2 (14C18)

Additional Context

No response

Screenshots

Screen.Recording.2023-03-15.at.22.01.08.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    🏁 Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions