Take a mutable context when resolving selections (#19948)
This is a behavior-preserving change, but lays the groundwork for expanding selections when the cursor lands inside of a "replace" block. Release Notes: - N/A
This commit is contained in:
parent
83e2889d63
commit
c8003c0697
17 changed files with 288 additions and 257 deletions
|
@ -2410,11 +2410,9 @@ impl OutlinePanel {
|
|||
editor: &View<Editor>,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) -> Option<PanelEntry> {
|
||||
let selection = editor
|
||||
.read(cx)
|
||||
.selections
|
||||
.newest::<language::Point>(cx)
|
||||
.head();
|
||||
let selection = editor.update(cx, |editor, cx| {
|
||||
editor.selections.newest::<language::Point>(cx).head()
|
||||
});
|
||||
let editor_snapshot = editor.update(cx, |editor, cx| editor.snapshot(cx));
|
||||
let multi_buffer = editor.read(cx).buffer();
|
||||
let multi_buffer_snapshot = multi_buffer.read(cx).snapshot(cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue