Use char level diff for Rewrap action for cursor preservation + not reinserting all text

This commit is contained in:
mgsloan@gmail.com 2024-11-07 10:01:29 -07:00
parent 2c4984091c
commit 3104b4235b

View File

@ -7123,7 +7123,7 @@ impl Editor {
tab_size,
);
let diff = TextDiff::from_lines(&selection_text, &wrapped_text);
let diff = TextDiff::from_chars(&selection_text, &wrapped_text);
let mut offset = start.to_offset(&buffer);
let mut moved_since_edit = true;