Typing "*" in Git commit joins with previous line
Summary
If I'm writing a Git commit message that has a bulleted list (another keyword for searchers: asterisk), the editor joins the line to the end of the previous line:
https://github.com/user-attachments/assets/1b36f33d-9ea9-406b-b7fa-3bd07546f127
Steps to trigger the problem:
- Start writing a Git commit
- Write a line of text
- Start a new line with "*"
Actual Behavior:
The "*" stays at the start of the new line
Expected Behavior:
The current line is joined to the previous line, and then the * is typed.
Workaround:
Insert a blank line and then delete it when you're done.
Note that if you edit the line after removing the gap the line will be joined to the previous one.
Zed Version and System Specs
Zed: v0.178.5 (Zed) OS: Linux Wayland bluefin 41 Memory: 62 GiB Architecture: x86_64 GPU: AMD Radeon 780M (RADV PHOENIX) || radv || Mesa 25.0.0
On a related note, when you type a space at the end of a list item that has another list item after, it advances the cursor to the start of the next line without modifying the text. The workaround is the same.
https://github.com/user-attachments/assets/42dc644f-73c3-4772-827f-48ef24962d16
Also not just list items, but any multi-line text for me.
I'm unable to reproduce this on Linux and Mac. Could someone try making a video of them reproducing it with the key context menu open (debug: open key context view) to help me figure out whats going wrong?
I'm unable to reproduce this on Linux and Mac. Could someone try making a video of them reproducing it with the key context menu open (
debug: open key context view) to help me figure out whats going wrong?
Here it is in Zed 0.182.9:
https://github.com/user-attachments/assets/25f8117d-afb2-4b2e-864a-a52cf98bf8ca
In the latest version, Zed 0.211.6.
While the git commit message editor is correctly formatted, but the message that gets committed gets rewrapped like above.
Could be the use of rewrap which invokes when "Commit"/"Amend" button is clicked.
Hey @seeni-dev, that seems worth putting in a separate issue, and related to https://github.com/zed-industries/zed/pull/32114. Would you mind creating a new issue with what you've commented here so we can track it separately?
In the latest version,
Zed 0.211.6.While the git commit message editor is correctly formatted, but the message that gets committed gets rewrapped like above.
![]()
same on me
OS: Windows 11 24H2 Zed Version: Zed Dev 0.213.0
