From 3cb8519ffd30fcb76a5c5fe7550f63f554cf8b31 Mon Sep 17 00:00:00 2001 From: Nikita Revenco <154856872+nikitarevenco@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:18:16 +0000 Subject: [PATCH] docs: add comments describing algorithm --- helix-term/src/commands.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index de8efeea9..1f6168644 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -5754,6 +5754,8 @@ fn surround_replace(cx: &mut Context) { let transaction = Transaction::change( doc.text(), sorted_pos.iter().map(|&pos| { + // "pos" is the idx of the character we are replacing + // "t" is the replacement character let mut t = Tendril::new(); t.push(pos.1); log::error!("{:?}, {:?}", pos.0, Some(&t));