Avoid auto-scrolling the editor when inserting/removing headers

This commit is contained in:
Antonio Scandurra 2023-06-14 10:49:23 +02:00
parent f8b9417406
commit 1aa1774688
5 changed files with 29 additions and 7 deletions

View file

@ -1055,8 +1055,8 @@ impl AssistantEditor {
})
.collect::<Vec<_>>();
editor.remove_blocks(old_blocks, cx);
let ids = editor.insert_blocks(new_blocks, cx);
editor.remove_blocks(old_blocks, None, cx);
let ids = editor.insert_blocks(new_blocks, None, cx);
self.blocks = HashSet::from_iter(ids);
});
}