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:
parent
19b5de2181
commit
7ef98fb935
6 changed files with 33 additions and 21 deletions
|
@ -259,7 +259,9 @@ impl OutlineView {
|
|||
|
||||
let editor = self.active_editor.read(cx);
|
||||
let buffer = editor.buffer().read(cx).read(cx);
|
||||
let cursor_offset = editor.newest_selection::<usize>(&buffer).head();
|
||||
let cursor_offset = editor
|
||||
.newest_selection_with_snapshot::<usize>(&buffer)
|
||||
.head();
|
||||
selected_index = self
|
||||
.outline
|
||||
.items
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue