@@ -111,11 +111,16 @@ func NewCommands(com *common.Common, sessionID string) (*Commands, error) {
112// SetSize sets the size of the dialog.
112// SetSize sets the size of the dialog.
113func (c *Commands) SetSize(width, height int) {
113func (c *Commands) SetSize(width, height int) {
114 c.width = width
115 c.width = width
115 c.height = height
116 c.height = height
116 innerWidth := width - c.com.Styles.Dialog.View.GetHorizontalFrameSize()
117 innerWidth := width - c.com.Styles.Dialog.View.GetHorizontalFrameSize()
118+ heightOffset := t.Dialog.Title.GetVerticalFrameSize() + 1 + // (1) title content
119+ t.Dialog.InputPrompt.GetVerticalFrameSize() + 1 + // (1) input content
120+ t.Dialog.HelpView.GetVerticalFrameSize() +
121+ t.Dialog.View.GetVerticalFrameSize()
117− c.input.SetWidth(innerWidth - c.com.Styles.Dialog.InputPrompt.GetHorizontalFrameSize() - 1)
122+ c.input.SetWidth(innerWidth - t.Dialog.InputPrompt.GetHorizontalFrameSize() - 1) // (1) cursor padding
118− c.list.SetSize(innerWidth, height-6) // (1) title + (3) input + (1) padding + (1) help
123+ c.list.SetSize(innerWidth, height-heightOffset)
119 c.help.SetWidth(width)
124 c.help.SetWidth(width)