diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index ff1922c8b1c8ddaee268487f6226b4b47423ab70..18405817f9f184e3e402133d7fdd49a9bf83e163 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -3432,8 +3432,11 @@ impl Editor { where P: ToOffset + Clone, { - self.display_map - .update(cx, |display_map, cx| display_map.insert_blocks(blocks, cx)) + let blocks = self + .display_map + .update(cx, |display_map, cx| display_map.insert_blocks(blocks, cx)); + self.request_autoscroll(Autoscroll::Fit, cx); + blocks } pub fn longest_row(&self, cx: &mut MutableAppContext) -> u32 {