on master help sign in
Fix #6605: Remove soft-wrap.enable option wrapping. (#6656)
af88a3cgibbz00
helix-core/src/syntax.rs+1−1
@@ -555,7 +555,7 @@ impl LanguageConfiguration {
555#[serde(default, rename_all = "kebab-case", deny_unknown_fields)]
555#[serde(default, rename_all = "kebab-case", deny_unknown_fields)]
556pub struct SoftWrap {
556pub struct SoftWrap {
557 /// Soft wrap lines that exceed viewport width. Default to off
557 /// Soft wrap lines that exceed viewport width. Default to off
558− pub enable: Option<bool>,
558+ pub enable: bool,
559 /// Maximum space left free at the end of the line.
559 /// Maximum space left free at the end of the line.
560 /// This space is used to wrap text at word boundaries. If that is not possible within this limit
560 /// This space is used to wrap text at word boundaries. If that is not possible within this limit
561 /// the word is simply split at the end of the line.
561 /// the word is simply split at the end of the line.
helix-view/src/document.rs+2−3
@@ -1444,9 +1444,8 @@ impl Document {
1444 .as_ref()
1444 .as_ref()
1445 .and_then(|config| config.soft_wrap.as_ref());
1445 .and_then(|config| config.soft_wrap.as_ref());
1446 let enable_soft_wrap = language_soft_wrap
1446 let enable_soft_wrap = language_soft_wrap
1447− .and_then(|soft_wrap| soft_wrap.enable)
1447+ .map(|soft_wrap| soft_wrap.enable)
1448− .or(editor_soft_wrap.enable)
1448+ .unwrap_or_else(|| editor_soft_wrap.enable);
1449− .unwrap_or(false);
1450 let max_wrap = language_soft_wrap
1449 let max_wrap = language_soft_wrap
1451 .and_then(|soft_wrap| soft_wrap.max_wrap)
1450 .and_then(|soft_wrap| soft_wrap.max_wrap)
1452 .or(config.soft_wrap.max_wrap)
1451 .or(config.soft_wrap.max_wrap)