Merge pull request #973 from zed-industries/selections-refactor

Pull selections out of editor into selections collection
This commit is contained in:
Keith Simmons 2022-05-13 16:07:26 -07:00 committed by GitHub
commit 2f7eb6dbc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 1998 additions and 1722 deletions

View file

@ -145,11 +145,9 @@ impl ProjectSymbolsView {
let editor = workspace.open_project_item::<Editor>(buffer, cx);
editor.update(cx, |editor, cx| {
editor.select_ranges(
[position..position],
Some(Autoscroll::Center),
cx,
);
editor.change_selections(Some(Autoscroll::Center), cx, |s| {
s.select_ranges([position..position])
});
});
});
Ok::<_, anyhow::Error>(())