@@ -67,11 +67,16 @@ func NewSessions(com *common.Common, sessions ...session.Session) *Session {
6767
6868// SetSize sets the size of the dialog.
6969func (s *Session) SetSize(width, height int) {
70+ t := s.com.Styles
7071 s.width = width
7172 s.height = height
72− innerWidth := width - s.com.Styles.Dialog.View.GetHorizontalFrameSize()
73− s.input.SetWidth(innerWidth - s.com.Styles.Dialog.InputPrompt.GetHorizontalFrameSize() - 1)
74− s.list.SetSize(innerWidth, height-6) // (1) title + (3) input + (1) padding + (1) help
73+ innerWidth := width - t.Dialog.View.GetHorizontalFrameSize()
74+ heightOffset := t.Dialog.Title.GetVerticalFrameSize() + 1 + // (1) title content
75+ t.Dialog.InputPrompt.GetVerticalFrameSize() + 1 + // (1) input content
76+ t.Dialog.HelpView.GetVerticalFrameSize() +
77+ t.Dialog.View.GetVerticalFrameSize()
78+ s.input.SetWidth(innerWidth - t.Dialog.InputPrompt.GetHorizontalFrameSize() - 1) // (1) cursor padding
79+ s.list.SetSize(innerWidth, height-heightOffset)
7580 s.help.SetWidth(width)
7681}
7782