Merge branch 'main' into settings-file

This commit is contained in:
Max Brunsfeld 2022-03-13 10:43:23 -07:00
commit b33a049958
27 changed files with 1304 additions and 448 deletions

View file

@ -115,7 +115,7 @@ impl GoToLine {
let point = snapshot.buffer_snapshot.clip_point(point, Bias::Left);
let display_point = point.to_display_point(&snapshot);
let row = display_point.row();
active_editor.set_highlighted_rows(Some(row..row + 1));
active_editor.highlight_rows(Some(row..row + 1));
active_editor.request_autoscroll(Autoscroll::Center, cx);
});
cx.notify();
@ -132,7 +132,7 @@ impl Entity for GoToLine {
fn release(&mut self, cx: &mut MutableAppContext) {
let scroll_position = self.prev_scroll_position.take();
self.active_editor.update(cx, |editor, cx| {
editor.set_highlighted_rows(None);
editor.highlight_rows(None);
if let Some(scroll_position) = scroll_position {
editor.set_scroll_position(scroll_position, cx);
}