diff --git a/helix-core/src/doc_formatter.rs b/helix-core/src/doc_formatter.rs index 70fe2f15e..bebda0535 100644 --- a/helix-core/src/doc_formatter.rs +++ b/helix-core/src/doc_formatter.rs @@ -518,7 +518,7 @@ pub fn reflow(text: RopeSlice, char_pos: usize, opts: &ReflowOpts) -> Vec opts.width && !grapheme.is_whitespace() { diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs index f1b4d23c0..4dc94d38a 100644 --- a/helix-term/tests/test/commands.rs +++ b/helix-term/tests/test/commands.rs @@ -910,5 +910,22 @@ wrapping]#", )) .await?; + test(( + "Test wrapping only part of the text +#[|wrapping should only modify the lines that are currently selected +]#", + ":reflow 11", + "Test wrapping only part of the text +#[|wrapping +should only +modify the +lines that +are +currently +selected +]#", + )) + .await?; + Ok(()) }