+3
-3
tui.go
+3
-3
tui.go
···
54
54
vp := viewport.New(0, 0)
55
55
vp.Style = borderedStyle
56
56
57
-
// todo: add the bordered style (it's too much to dig through it's styles rn)
58
57
lis := list.New([]list.Item{}, itemDelegate{}, 0, 0)
59
58
lis.Title = "Select cached RFC"
60
59
lis.SetShowPagination(false)
···
118
117
m.currentRfc.Height = h
119
118
m.currentRfc.Width = msg.Width
120
119
m.help.Width = msg.Width
121
-
m.cachedRfcs.SetHeight(h)
120
+
m.cachedRfcs.SetHeight(h - 2) // needed for borders
122
121
m.cachedRfcs.SetWidth(msg.Width)
122
+
borderedStyle = borderedStyle.Width(msg.Width - 2) // needed for borders
123
123
124
124
case tea.KeyMsg:
125
125
switch msg.String() {
···
190
190
case Reading:
191
191
res = m.currentRfc.View()
192
192
case CachedRFCs:
193
-
res = m.cachedRfcs.View()
193
+
res = borderedStyle.Render(m.cachedRfcs.View())
194
194
}
195
195
196
196
return res + m.helpView()