mirror of
https://github.com/helix-editor/helix
synced 2024-11-10 10:34:45 +01:00
Co-authored-by: gibbz00 <gabrielhansson@gmail.com>
This commit is contained in:
parent
e856906f76
commit
af88a3c15c
@ -555,7 +555,7 @@ 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: Option<bool>,
|
||||
pub enable: 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.
|
||||
|
@ -1444,9 +1444,8 @@ impl Document {
|
||||
.as_ref()
|
||||
.and_then(|config| config.soft_wrap.as_ref());
|
||||
let enable_soft_wrap = language_soft_wrap
|
||||
.and_then(|soft_wrap| soft_wrap.enable)
|
||||
.or(editor_soft_wrap.enable)
|
||||
.unwrap_or(false);
|
||||
.map(|soft_wrap| soft_wrap.enable)
|
||||
.unwrap_or_else(|| editor_soft_wrap.enable);
|
||||
let max_wrap = language_soft_wrap
|
||||
.and_then(|soft_wrap| soft_wrap.max_wrap)
|
||||
.or(config.soft_wrap.max_wrap)
|
||||
|
Loading…
Reference in New Issue
Block a user