docs: add comments describing algorithm

pull/12055/head
Nikita Revenco 2 weeks ago
parent f8cace7957
commit 3cb8519ffd

@ -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));

Loading…
Cancel
Save