Skip to content

Wrap lines config option - #559

Merged
jonathanj merged 2 commits into
altsem:masterfrom
jonathanj:wrap-lines-config-option
Sep 30, 2026
Merged

jonathanj merged 2 commits into
altsem:masterfrom
jonathanj:wrap-lines-config-option

Conversation

@jonathanj

@jonathanj jonathanj commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

I like the layout change to the commits view, but I found myself being frustrated by line wrapping consuming a lot of space when I use gitu in a split on my laptop:

image

I had Claude add a general.wrap_lines option (defaulting to true, preserving the current behaviour) and reviewed its implementation which seems reasonable to me (packing spans).

This is what it looks like with general.wrap_lines = false:

image

(Let me know if i should squash the commits together.)

Checklist

@altsem altsem left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Should we keep the ellipsis at the end for truncated lines?

A span the layout cut off at an edge was still printed in full, so a
single word wider than the screen ran into the terminal's own wrapping.
@jonathanj
jonathanj force-pushed the wrap-lines-config-option branch from 4c65395 to 0950de2 Compare September 25, 2026 15:52
@jonathanj

Copy link
Copy Markdown
Collaborator Author

Nice! Should we keep the ellipsis at the end for truncated lines?

Ooh, great idea. I've updated the code to do this, and updated my screenshot too.

@altsem

altsem commented Sep 26, 2026

Copy link
Copy Markdown
Owner

@jonathanj you should be able to merge this, I'll leave it for you to try :)
I'd pick "Rebase and merge" so your commits are kept!

@jonathanj
jonathanj merged commit 87ad79c into altsem:master Sep 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants