Maintain scroll bottom when streaming assistant responses

This commit is contained in:
Antonio Scandurra 2023-06-07 15:01:50 +02:00
parent 43500dbf60
commit d26cc2c897
6 changed files with 176 additions and 75 deletions

View file

@ -400,7 +400,7 @@ fn scroll(editor: &mut Editor, amount: &ScrollAmount, cx: &mut ViewContext<Edito
};
let scroll_margin_rows = editor.vertical_scroll_margin() as u32;
let top_anchor = editor.scroll_manager.anchor().top_anchor;
let top_anchor = editor.scroll_manager.anchor().anchor;
editor.change_selections(None, cx, |s| {
s.replace_cursors_with(|snapshot| {