Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/doc_formatter.rs')
-rw-r--r--helix-core/src/doc_formatter.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/helix-core/src/doc_formatter.rs b/helix-core/src/doc_formatter.rs
index 3cfc1570..d0826217 100644
--- a/helix-core/src/doc_formatter.rs
+++ b/helix-core/src/doc_formatter.rs
@@ -380,9 +380,10 @@ impl<'t> DocumentFormatter<'t> {
// by a newline/eof character here.
Ordering::Equal
if self.text_fmt.soft_wrap_at_text_width
- && self.peek_grapheme(col, char_pos).map_or(false, |grapheme| {
- grapheme.is_newline() || grapheme.is_eof()
- }) => {}
+ && self
+ .peek_grapheme(col, char_pos)
+ .is_some_and(|grapheme| grapheme.is_newline() || grapheme.is_eof()) => {
+ }
Ordering::Equal if word_width > self.text_fmt.max_wrap as usize => return,
Ordering::Greater if word_width > self.text_fmt.max_wrap as usize => {
self.peeked_grapheme = self.word_buf.pop();