Track caller on h_stack and v_stack

Antonio Scandurra created

Change summary

crates/gpui2/src/elements/div.rs   | 2 +-
crates/ui2/src/components/stack.rs | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

Detailed changes

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();
                     }
                 }

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()
 }