WIP: Re-implement apply_local_edit to look more like apply_remote_edit
Co-Authored-By: Nathan Sobo <nathan@zed.dev> Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
Max Brunsfeld
parent
72464a9460
commit
9a29f55777
+1
-3
@@ -723,9 +723,7 @@ impl Editor {
|
||||
let mut new_selections = Vec::new();
|
||||
self.buffer.update(cx, |buffer, cx| {
|
||||
let edit_ranges = old_selections.iter().map(|(_, range)| range.clone());
|
||||
if let Err(error) = buffer.edit(edit_ranges, text.as_str(), Some(cx)) {
|
||||
log::error!("error inserting text: {}", error);
|
||||
};
|
||||
buffer.edit(edit_ranges, text.as_str(), Some(cx));
|
||||
let text_len = text.len() as isize;
|
||||
let mut delta = 0_isize;
|
||||
new_selections = old_selections
|
||||
|
||||
Reference in New Issue
Block a user