From af88a3c15cc4ddbb1e2f2ea6492868ffb8aba40b Mon Sep 17 00:00:00 2001 From: gibbz00 Date: Sat, 8 Apr 2023 14:18:11 +0200 Subject: Fix #6605: Remove soft-wrap.enable option wrapping. (#6656) Co-authored-by: gibbz00 --- helix-view/src/document.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'helix-view') diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index eca60026..65a5a6e2 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -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) -- cgit v1.2.3-70-g09d2