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

Word wrap does not include leading parenthesis or bracket when wrapping #6612

Open
cade-rea opened this issue Feb 4, 2025 · 0 comments
Open

Comments

@cade-rea
Copy link

cade-rea commented Feb 4, 2025

Description of the bug

When word wrap is enabled, leading parenthesis (() and bracket ([) are not included in the word token when wrapping. Other text wrappers like quotes and braces wrap fine. This behavior causes confusion during editing, as a line break usually happens after whitespace.

In the attached screenshot, I have pointed out the parenthesis and bracket that are not wrapped. Examples with braces and quotes are also included to show the expected result.

Image

Steps to reproduce

  1. Start in safe mode
  2. Ensure that word wrap is enabled from the View toolbar menu
  3. Enter text that includes text wrapped in parenthesis and/or bracket where the line should break. For example:
Lorem ipsum dolor sit amet, consectetur adip (abcd)

Lorem ipsum dolor sit amet, consectetur adip [abcd]

Lorem ipsum dolor sit amet, consectetur adip {abcd}

Lorem ipsum dolor sit amet, consectetur adip "abcd"
  1. Adjust the window so that the lines break.
  2. Observe that the tokens (abcd) and [abcd] are broken between the leading symbol and the text.

Expected behavior

I expect the leading parenthesis and bracket to be included in the word token that is wrapped to the next line

Actual behavior

The leading parenthesis and/or bracket is separated from the text it wraps and is left on the previous line.

Sublime Text build number

4192

Operating system & version

macOS 15.1.1 (24B91) (Sequoia 15.1.1)

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants