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 #6605: Remove soft-wrap.enable option wrapping. #6656

Merged
merged 1 commit into from
Apr 8, 2023

Conversation

gibbz00
Copy link
Contributor

@gibbz00 gibbz00 commented Apr 8, 2023

No description provided.

@archseer archseer merged commit af88a3c into helix-editor:master Apr 8, 2023
@gibbz00 gibbz00 deleted the softwrap-toggle branch April 8, 2023 12:29
archseer added a commit that referenced this pull request Apr 8, 2023
archseer added a commit that referenced this pull request Apr 8, 2023
This caused a bug that would ignore the global config.

This reverts commit af88a3c.
@archseer
Copy link
Member

archseer commented Apr 8, 2023

(Had to revert in master, @pascalkuthe pointed out a subtle bug with config override handling)

@pascalkuthe
Copy link
Member

pascalkuthe commented Apr 8, 2023

This is not the right fix for the problem. Softwrap can be configured both per language and globally. The language configuration takes precedence over the global config.

Therefore all softwrap options are options so that we can fallback to the global config.

With this PR the following language config would disable softwrap for markdown even if softwrap is globally enabled:

[[language]]
name ="markdown"
softwrap.wrap-at-text-width = true

In this case there is a language specific softwrap so if softwrap.enable defaults to false this would overwrite the global softwrap.enable setting.

To fix #6605 twe should either add a spegifal case to the default implementation of edit::Config to use Some(false) or make :toggle assume false if it encounters null (the former is probably better since some options default to true)

Triton171 pushed a commit to Triton171/helix that referenced this pull request Jun 18, 2023
Triton171 pushed a commit to Triton171/helix that referenced this pull request Jun 18, 2023
…g. (helix-editor#6656)"

This caused a bug that would ignore the global config.

This reverts commit af88a3c.
wes-adams pushed a commit to wes-adams/helix that referenced this pull request Jul 4, 2023
wes-adams pushed a commit to wes-adams/helix that referenced this pull request Jul 4, 2023
…g. (helix-editor#6656)"

This caused a bug that would ignore the global config.

This reverts commit af88a3c.
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
…g. (helix-editor#6656)"

This caused a bug that would ignore the global config.

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

Successfully merging this pull request may close these issues.

3 participants