Revert "Remove into SelectionEffects
from .change_selections"
This reverts commit 28380d714d
.
This commit is contained in:
parent
28380d714d
commit
6e762d9c05
65 changed files with 625 additions and 837 deletions
|
@ -2,8 +2,8 @@ pub mod cursor_position;
|
|||
|
||||
use cursor_position::{LineIndicatorFormat, UserCaretPosition};
|
||||
use editor::{
|
||||
Anchor, Editor, MultiBufferSnapshot, RowHighlightOptions, SelectionEffects, ToOffset, ToPoint,
|
||||
actions::Tab, scroll::Autoscroll,
|
||||
Anchor, Editor, MultiBufferSnapshot, RowHighlightOptions, ToOffset, ToPoint, actions::Tab,
|
||||
scroll::Autoscroll,
|
||||
};
|
||||
use gpui::{
|
||||
App, DismissEvent, Entity, EventEmitter, FocusHandle, Focusable, Render, SharedString, Styled,
|
||||
|
@ -249,12 +249,9 @@ impl GoToLine {
|
|||
let Some(start) = self.anchor_from_query(&snapshot, cx) else {
|
||||
return;
|
||||
};
|
||||
editor.change_selections(
|
||||
SelectionEffects::scroll(Autoscroll::center()),
|
||||
window,
|
||||
cx,
|
||||
|s| s.select_anchor_ranges([start..start]),
|
||||
);
|
||||
editor.change_selections(Some(Autoscroll::center()), window, cx, |s| {
|
||||
s.select_anchor_ranges([start..start])
|
||||
});
|
||||
editor.focus_handle(cx).focus(window);
|
||||
cx.notify()
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue