Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/wrap.rs')
-rw-r--r--helix-core/src/wrap.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/helix-core/src/wrap.rs b/helix-core/src/wrap.rs
index 337b389a..eabc47d4 100644
--- a/helix-core/src/wrap.rs
+++ b/helix-core/src/wrap.rs
@@ -1,11 +1,7 @@
use smartstring::{LazyCompact, SmartString};
-use textwrap::{Options, WordSplitter::NoHyphenation};
/// Given a slice of text, return the text re-wrapped to fit it
/// within the given width.
-pub fn reflow_hard_wrap(text: &str, text_width: usize) -> SmartString<LazyCompact> {
- let options = Options::new(text_width)
- .word_splitter(NoHyphenation)
- .word_separator(textwrap::WordSeparator::AsciiSpace);
- textwrap::refill(text, options).into()
+pub fn reflow_hard_wrap(text: &str, max_line_len: usize) -> SmartString<LazyCompact> {
+ textwrap::refill(text, max_line_len).into()
}