mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
repl: Fix repl-over-selection not being Vim-line-wise aware (#15068)
Release Notes: - N/A
This commit is contained in:
parent
7644605f0f
commit
ba6c36f370
@ -138,12 +138,14 @@ fn snippet(
|
||||
editor: WeakView<Editor>,
|
||||
cx: &mut WindowContext,
|
||||
) -> Option<(String, Arc<Language>, Range<Anchor>)> {
|
||||
let selection = editor
|
||||
.update(cx, |editor, cx| editor.selections.newest_adjusted(cx))
|
||||
.ok()?;
|
||||
|
||||
let editor = editor.upgrade()?;
|
||||
let editor = editor.read(cx);
|
||||
|
||||
let buffer = editor.buffer().read(cx).snapshot(cx);
|
||||
|
||||
let selection = editor.selections.newest::<Point>(cx);
|
||||
let multi_buffer_snapshot = editor.buffer().read(cx).snapshot(cx);
|
||||
|
||||
let range = if selection.is_empty() {
|
||||
|
Loading…
Reference in New Issue
Block a user