Skip to content

Conversation

@sogladev
Copy link

PR Description

In addition to ignoring footnote, also ignore Co-authored-by and Signed-off-by

This no-wrap detection only needs to check for leading ASCII, so we can use a fixed bytebuffer. This avoids repeated heap allocs when building strings

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

in addition to ignoring footnote, also ignore Co-authored-by and
Signed-off-by
@sogladev sogladev changed the title Fix Co-authored-by and Signed-off-by auto-wrapping fix: Co-authored-by and Signed-off-by auto-wrapping Jan 20, 2026
@stefanhaller
Copy link
Collaborator

@sogladev I'm sorry that I lead you down the wrong path with this, for two reasons:

  • unifying the two matchers wasn't a good idea, they have different behavior (I only realized this after I tested your branch and found that it broke the footnote behavior). This is because for footnotes we only want to prevent the space(s) immediately following the colon from breaking the line, but subsequent spaces further down the line should be wrapped as usual. For trailers, we want to prevent the entire line from being wrapped.
  • doing the change in lazygit.git (rather than in the gocui repo) is good as long as you are not touching (or adding) gocui tests (these are not vendored). As soon as gocui tests are involved, which is the case here, the change needs to be made in the gocui repo.

To spare you the extra work of having to start over again I decided to raise a gocui PR myself. Please review: jesseduffield/gocui#97. I made a "Bump gocui" PR here for easier testing: #5230.

@sogladev
Copy link
Author

#5230

@sogladev sogladev closed this Jan 24, 2026
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.

Auto-wrap breaks long co author string

2 participants