Skip to content

✨ Indent wrapped lines #18

Open
Open

Description

@ben-p-commits

Is your feature request related to a problem? Please describe.

In the enhancement requested by CodeEditApp/CodeEdit#868, the request to add configurable indentation to wrapped lines is beyond the current capabilities of CodeEditTextView.

image

Describe the solution you'd like

Add a parameter or option which allows custom indentation to be added for wrapped lines. May require enhancement + PR in STTextView

Additional Context

Example behavior in Xcode:

4 spaces

image

image

12 spaces

image

image

Activity

  1. changed the title [-]Add support for indenting wrapped lines[/-] [+]✨ Add support for indenting wrapped lines[/+] on Feb 14, 2023
  2. added a commit that references this issue on Feb 12, 2024
  3. changed the title [-]✨ Add support for indenting wrapped lines[/-] [+]✨ Indent wrapped lines[/+] on Sep 3, 2024
  4. Bogdan-Belogurov commented on Jun 3, 2025

    @Bogdan-Belogurov

    @thecoolwinter Hi! Can I take this one?

  5. austincondiff commented on Jun 14, 2025

    @austincondiff
    Contributor

    @Bogdan-Belogurov Where are we with this? No rush, just checking.

  6. Bogdan-Belogurov commented on Jun 17, 2025

    @Bogdan-Belogurov

    @austincondiff @thecoolwinter Hi! I'm still in progress.
    I'm trying to find the easiest way to implement this logic. I found this PR with TextLayoutManagerRenderDelegate, but the current TextView doesn't use this (only MinimapView). Am I right to add the realisation of the TextLayoutManagerRenderDelegate protocol to the TextView?

  7. thecoolwinter commented on Jun 19, 2025

    @thecoolwinter
    Contributor

    @austincondiff @thecoolwinter Hi! I'm still in progress.
    Am I right to add the realisation of the TextLayoutManagerRenderDelegate protocol to the TextView?

    Not quite, that protocol is to allow developers to override layout or rendering behavior. CETV handles that by default but in the minimap's case it overrides how text is drawn (little dots).

    Three places to look:

    • LineFragmentRenderer does the actual drawing of the text in a graphics context. This will need to be modified to draw the indented fragments correctly.
    • Typesetter determines line breaks - you'll want to modify this one to allow less width for line fragments that should be indented, which will change where line breaks occur.
    • LineFragment will need to know about any indentation and adjust to account for that for instance when determining the content offset of an X coordinate in the fragment.
  8. alechash commented on Aug 1, 2025

    @alechash

    Hey @Bogdan-Belogurov and @thecoolwinter, not sure of the progress on this but if it has stalled I can take it. Could commit a few hours over the next two days + more this upcoming week.

    Thanks, let me know!

  9. vksvicky commented on Jan 31, 2026

    @vksvicky

    Is anyone working on this? I can pick it up and have a look!

  10. alechash commented on Jan 31, 2026

    @alechash

    @vksvicky I would say go for it. I never heard back from them when I asked and by now I don’t have much free time at the moment to put anything toward it.

  11. vksvicky commented on Feb 1, 2026

    @vksvicky

    @alechash please assign this to me, so I can change the status and add relevant notes as I progress

  12. alechash commented on Feb 1, 2026

    @alechash

    @vksvicky I cannot assign this issue. Would need to come from @thecoolwinter.

  13. vksvicky commented on Feb 1, 2026

    @vksvicky

    Have made changes and here the pull request CodeEditApp/CodeEdit#2158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions