Skip to content

Keep punctuation with words on soft-wrap #37010

@notpeter

Description

@notpeter

Summary

In certain cases soft-wrap may wrap punctuation separately from the word that it follows. For example Boo! should never become Boo\n!.

Description

Steps to reproduce:

  1. Paste this into a zed buffer
    No forking of an editor required!
    
  2. Enable soft-wrap
  3. Resize the window until the exclamation point wraps.

Expected Behavior: required! is on one line or the other
Actual Behavior: required! can be split across two lines as required and !

Image

Originally reported by @nathansobo

Zed Version and System Specs

Zed: v0.203.0 (Zed Nightly f4071bd)
OS: macOS 15.6.1
Memory: 64 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

Labels

area:editorFeedback for code editing, formatting, editor iterations, etcstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions