Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix adding blank line at end of commit message #4182

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

stefanhaller
Copy link
Collaborator

  • PR Description

This fixes a bug where adding enough new lines to a commit message description such that it becomes taller than the window so that the window needs to resize vertically, the cursor wouldn't move to the added blank line, but stay at the end of the previous line. This was a regression introduced with #4152.

  • 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

Copy link

codacy-production bot commented Jan 18, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for a77dcbe1 92.31%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (a77dcbe) Report Missing Report Missing Report Missing
Head commit (20d0b43) 52030 44980 86.45%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4182) 13 12 92.31%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

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

LGTM

For editable views it is important to actually show the blank line so that we
can put the cursor there for typing.

This fixes problems with adding blank lines at the end of longer commit
messages.
@stefanhaller stefanhaller force-pushed the fix-adding-blank-line-at-end-of-commit-message branch from c7123d2 to 20d0b43 Compare January 20, 2025 16:53
@stefanhaller stefanhaller added the bug Something isn't working label Jan 20, 2025
@stefanhaller stefanhaller merged commit 40d6800 into master Jan 20, 2025
14 of 15 checks passed
@stefanhaller stefanhaller deleted the fix-adding-blank-line-at-end-of-commit-message branch January 20, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants