mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-26 03:59:55 +00:00
Autoscroll after inserting blocks
This commit is contained in:
parent
9cd4e5ba04
commit
31eeffa5a7
1 changed files with 5 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue