press the down key to move to the end of the line (#52)

This commit is contained in:
reya
2025-05-30 12:14:51 +07:00
committed by GitHub
parent 63191c16bd
commit 7cc512331b
6 changed files with 52 additions and 42 deletions

View File

@@ -3,9 +3,10 @@ use std::{cell::RefCell, rc::Rc};
use gpui::{
actions, anchored, deferred, div, prelude::FluentBuilder as _, px, AnyElement, App, Bounds,
Context, Corner, DismissEvent, DispatchPhase, Element, ElementId, Entity, EventEmitter,
FocusHandle, Focusable, GlobalElementId, Hitbox, InteractiveElement as _, IntoElement,
KeyBinding, LayoutId, ManagedView, MouseButton, MouseDownEvent, ParentElement, Pixels, Point,
Render, ScrollHandle, StatefulInteractiveElement, Style, StyleRefinement, Styled, Window,
FocusHandle, Focusable, GlobalElementId, Hitbox, HitboxBehavior, InteractiveElement as _,
IntoElement, KeyBinding, LayoutId, ManagedView, MouseButton, MouseDownEvent, ParentElement,
Pixels, Point, Render, ScrollHandle, StatefulInteractiveElement, Style, StyleRefinement,
Styled, Window,
};
use crate::{Selectable, StyledExt as _};
@@ -378,7 +379,8 @@ impl<M: ManagedView> Element for Popover<M> {
.popover_layout_id
.map(|id| window.layout_bounds(id));
let hitbox = window.insert_hitbox(trigger_bounds.unwrap_or_default(), false);
let hitbox =
window.insert_hitbox(trigger_bounds.unwrap_or_default(), HitboxBehavior::Normal);
PrepaintState {
trigger_bounds,