diff options
author | Blaž Hrastnik | 2023-04-08 12:50:43 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-04-08 12:52:34 +0000 |
commit | 58e457a4e1037caf43c17dea93c5321c1ae74103 (patch) | |
tree | d049444df437fb193fc5e6356c0daea89abc85ea /helix-core/src | |
parent | 25858ec2e3265a2cfc562e39136beb76df77953b (diff) |
Revert "Fix #6605: Remove soft-wrap.enable option wrapping. (#6656)"
This caused a bug that would ignore the global config.
This reverts commit af88a3c15cc4ddbb1e2f2ea6492868ffb8aba40b.
Diffstat (limited to 'helix-core/src')
-rw-r--r-- | helix-core/src/syntax.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 0e6696db..c34ea81a 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -555,7 +555,9 @@ impl LanguageConfiguration { #[serde(default, rename_all = "kebab-case", deny_unknown_fields)] pub struct SoftWrap { /// Soft wrap lines that exceed viewport width. Default to off - pub enable: bool, + // NOTE: Option on purpose because the struct is shared between language config and global config. + // By default the option is None so that the language config falls back to the global config unless explicitly set. + pub enable: Option<bool>, /// Maximum space left free at the end of the line. /// This space is used to wrap text at word boundaries. If that is not possible within this limit /// the word is simply split at the end of the line. |