Make versions oldest_selection and newest_selection that don't require snapshots

I thought I needed this but actually didn't, but I still kinda think it's a good change for the public interface of Editor.
This commit is contained in:
Nathan Sobo 2022-02-27 13:02:09 -07:00
parent 19b5de2181
commit 7ef98fb935
6 changed files with 33 additions and 21 deletions

View file

@ -54,7 +54,7 @@ impl GoToLine {
let buffer = editor.buffer().read(cx).read(cx);
(
Some(scroll_position),
editor.newest_selection(&buffer).head(),
editor.newest_selection_with_snapshot(&buffer).head(),
buffer.max_point(),
)
});