From 4efd6713c5b30b33c497a1f85b77a7b0a7fd17e0 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Sun, 20 Jun 2021 15:09:10 -0700 Subject: Work on moving code over to LineEnding instead of assuming '\n'. Also some general cleanup and some minor fixes along the way. --- helix-tui/src/text.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'helix-tui/src/text.rs') diff --git a/helix-tui/src/text.rs b/helix-tui/src/text.rs index c671e918..b23bfd81 100644 --- a/helix-tui/src/text.rs +++ b/helix-tui/src/text.rs @@ -47,6 +47,7 @@ //! ]); //! ``` use crate::style::Style; +use helix_core::line_ending::str_is_line_ending; use std::borrow::Cow; use unicode_segmentation::UnicodeSegmentation; use unicode_width::UnicodeWidthStr; @@ -177,7 +178,7 @@ impl<'a> Span<'a> { symbol: g, style: base_style.patch(self.style), }) - .filter(|s| s.symbol != "\n") + .filter(|s| !str_is_line_ending(s.symbol)) } } -- cgit v1.2.3-70-g09d2