From 570911e5893af0c7d13d29f478217d652c971f13 Mon Sep 17 00:00:00 2001 From: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com> Date: Sun, 2 Feb 2025 19:42:01 +0000 Subject: [PATCH] fix: many single width selections panic --- helix-term/tests/test/commands.rs | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs index 3330eb597..537bc4827 100644 --- a/helix-term/tests/test/commands.rs +++ b/helix-term/tests/test/commands.rs @@ -910,6 +910,64 @@ async fn test_injected_comment_tokens_multiple_selections() -> anyhow::Result<() )) .await?; + // Many single-selections + test(( + indoc! {r#"\ +
C#[|o]#mment t#(|o)#ggle #(|o)#n this line sh#(|o)#uld use the HTML c#(|o)#mment t#(|o)#ken(s).
+ + "#}, + ":lang htmlC#[|]#mment t#(|)#ggle #(|)#n this line sh#(|)#uld use the HTML c#(|)#mment t#(|)#ken(s).
+ + "#}, + )) + .await?; + test(( + indoc! {r#"\ +C#[|]#mment t#(|)#ggle #(|)#n this line sh#(|)#uld use the HTML c#(|)#mment t#(|)#ken(s).
+ + "#}, + ":lang htmlC#[|o]#mment t#(|o)#ggle #(|o)#n this line sh#(|o)#uld use the HTML c#(|o)#mment t#(|o)#ken(s).
+ + "#}, + )) + .await?; + Ok(()) }