mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-04 18:15:21 +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
|
where
|
||||||
P: ToOffset + Clone,
|
P: ToOffset + Clone,
|
||||||
{
|
{
|
||||||
self.display_map
|
let blocks = self
|
||||||
.update(cx, |display_map, cx| display_map.insert_blocks(blocks, cx))
|
.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 {
|
pub fn longest_row(&self, cx: &mut MutableAppContext) -> u32 {
|
||||||
|
|
Loading…
Reference in a new issue