Rework edit prediction preview mode (#24700)

Don't animate the cursor when previewing jumps.
Instead, display the jump popover with a line that resembles a cursor,
indicating the jump destination. If the jump destination is outside of
the view port, there is an extra step in which `tab` scrolls the
viewport to reveal the jump destination.

Release Notes:

- N/A

---------

Co-authored-by: danilo-leal <daniloleal09@gmail.com>
Co-authored-by: agu-z <hi@aguz.me>
This commit is contained in:
Max Brunsfeld 2025-02-11 15:14:12 -08:00 committed by GitHub
parent 5293f5724c
commit 148547ecd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 245 additions and 519 deletions

View file

@ -3,7 +3,7 @@ use gpui::{hsla, App, Styled};
use crate::prelude::*;
use crate::ElevationIndex;
fn elevated<E: Styled>(this: E, cx: &mut App, index: ElevationIndex) -> E {
fn elevated<E: Styled>(this: E, cx: &App, index: ElevationIndex) -> E {
this.bg(cx.theme().colors().elevated_surface_background)
.rounded_lg()
.border_1()
@ -54,7 +54,7 @@ pub trait StyledExt: Styled + Sized {
/// Sets `bg()`, `rounded_lg()`, `border()`, `border_color()`, `shadow()`
///
/// Examples: Notifications, Palettes, Detached/Floating Windows, Detached/Floating Panels
fn elevation_2(self, cx: &mut App) -> Self {
fn elevation_2(self, cx: &App) -> Self {
elevated(self, cx, ElevationIndex::ElevatedSurface)
}