Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Improve soft-wrapping by breaking words like web browsers #16904

Closed
ariasuni opened this issue Mar 8, 2018 · 3 comments
Closed

Improve soft-wrapping by breaking words like web browsers #16904

ariasuni opened this issue Mar 8, 2018 · 3 comments

Comments

@ariasuni
Copy link
Contributor

ariasuni commented Mar 8, 2018

Description

Current soft-wrapping behavior is not aggressive enough and sometimes leads to bad results.

Steps to Reproduce

  1. Enable «Soft Wrap» and «Soft Wrap at Preferred Line Length» in «Editor» tab of Settings
  2. Copy an URL in a text editor tab or a sequence of non-spaces characters that have more characters than the Preferred Line Length setting

Expected behavior:

  • Break character sequences on spaces, dashes and slashes, like in a web browser
  • Break character sequences at most at the «Preferred Line Length» setting
  • Show a grayed out character, like those for EOL or spaces, when Atom break a word that had no spaces in it. Suggestion for default character: broken bar ¦, which is present in the same Unicode block than ¤¬».

For example, if Preferred Line Length is set to 20, then it should behave like this (| character represent the wrap-guide):

https://github.com¦ |
/atom/atom/issues¦  |
/new                |
                    |
Averylongword-¦     |
thatshouldbreak     |
                    |
Averylongword-    ¦ |  # four spaces after the dash and we see where it stops
thatshouldbreak     |  # ¦ allows to differentiate with the previous example
                    |
Averylongwordwithnos|¦  # no space, dash or slash in the word
eparator            |

Actual behavior:

  • Character sequences break only on spaces
  • If the character sequence doesn’t contain space and fill the whole line, the word is cut at the window edge instead of the expected Preferred Line Length (see screenshot).
    screenshot of current work-wrapping behavior
https://github.com/a|tom/atom/issues/new
                    |
Averylongword-thatsh|ouldbreak
                    |
Averylongword-      | # four spaces after the dash but we can’t see it
thatshouldbreak     |
                    |
Averylongwordwithnos|eparator

Versions

Arch Linux
Atom    : 1.24.0
Electron: 1.8.2
Chrome  : 59.0.3071.115
Node    : 8.2.1
@Rezayovan
Copy link

Will try to submit a pr for this issue by the end of the day

@stale
Copy link

stale bot commented Aug 30, 2019

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of Atom
  2. Comment that the issue is still reproducible and include:
    • What version of Atom you reproduced the issue on
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

Issues that are labeled as triaged will not be automatically marked as stale.

@stale stale bot added the stale label Aug 30, 2019
@stale stale bot closed this as completed Sep 13, 2019
@lock
Copy link

lock bot commented Mar 11, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants