Avoid auto-scrolling the editor when inserting/removing headers
This commit is contained in:
parent
f8b9417406
commit
1aa1774688
5 changed files with 29 additions and 7 deletions
|
@ -430,7 +430,7 @@ impl ProjectDiagnosticsEditor {
|
|||
});
|
||||
|
||||
self.editor.update(cx, |editor, cx| {
|
||||
editor.remove_blocks(blocks_to_remove, cx);
|
||||
editor.remove_blocks(blocks_to_remove, None, cx);
|
||||
let block_ids = editor.insert_blocks(
|
||||
blocks_to_add.into_iter().map(|block| {
|
||||
let (excerpt_id, text_anchor) = block.position;
|
||||
|
@ -442,6 +442,7 @@ impl ProjectDiagnosticsEditor {
|
|||
disposition: block.disposition,
|
||||
}
|
||||
}),
|
||||
Some(Autoscroll::fit()),
|
||||
cx,
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue