From 02e53025f30efbd56b7b03f53d1aaf4237742ba1 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 19 Dec 2023 14:26:30 +0100 Subject: [PATCH] Track caller on h_stack and v_stack --- crates/gpui2/src/elements/div.rs | 2 +- crates/ui2/src/components/stack.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/gpui2/src/elements/div.rs b/crates/gpui2/src/elements/div.rs index 1f56f44900477780085b556f46adc508f4ff119a..631ffc43c679cdb4fc7147cf29607a4e53aa9935 100644 --- a/crates/gpui2/src/elements/div.rs +++ b/crates/gpui2/src/elements/div.rs @@ -1065,7 +1065,7 @@ impl Interactivity { { cx.focus(&focus_handle); // If there is a parent that is also focusable, prevent it - // from trasferring focus because we already did so. + // from transferring focus because we already did so. cx.prevent_default(); } } diff --git a/crates/ui2/src/components/stack.rs b/crates/ui2/src/components/stack.rs index 6ae88cb1a296913666df46ba6a86998ae57a991c..a6321b93d7c9e15afa1d3053fa61fb467acdbeb0 100644 --- a/crates/ui2/src/components/stack.rs +++ b/crates/ui2/src/components/stack.rs @@ -5,6 +5,7 @@ use crate::StyledExt; /// Horizontally stacks elements. /// /// Sets `flex()`, `flex_row()`, `items_center()` +#[track_caller] pub fn h_stack() -> Div { div().h_flex() } @@ -12,6 +13,7 @@ pub fn h_stack() -> Div { /// Vertically stacks elements. /// /// Sets `flex()`, `flex_col()` +#[track_caller] pub fn v_stack() -> Div { div().v_flex() }