@@ -38,6 +38,24 @@ func InputCursor(t *styles.Styles, cur *tea.Cursor) *tea.Cursor {
38 return cur
38 return cur
41+// adjustOnboardingInputCursor removes the dialog view frame offset from an
42+// input cursor. Onboarding dialogs render without Dialog.View frame, while
43+// InputCursor includes that frame offset for regular dialogs.
44+func adjustOnboardingInputCursor(t *styles.Styles, cur *tea.Cursor) *tea.Cursor {
49+ dialogStyle := t.Dialog.View
50+ cur.X -= dialogStyle.GetBorderLeftSize() +
51+ dialogStyle.GetPaddingLeft() +
52+ dialogStyle.GetMarginLeft()
53+ cur.Y -= dialogStyle.GetBorderTopSize() +
54+ dialogStyle.GetPaddingTop() +
55+ dialogStyle.GetMarginTop()
41// RenderContext is a dialog rendering context that can be used to render
59// RenderContext is a dialog rendering context that can be used to render
42// common dialog layouts.
60// common dialog layouts.
43type RenderContext struct {
61type RenderContext struct {