aboutsummaryrefslogtreecommitdiffhomepage
path: root/Brick/Widgets/DefnList.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Brick/Widgets/DefnList.hs')
-rw-r--r--Brick/Widgets/DefnList.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Brick/Widgets/DefnList.hs b/Brick/Widgets/DefnList.hs
index 016a522..3bc4deb 100644
--- a/Brick/Widgets/DefnList.hs
+++ b/Brick/Widgets/DefnList.hs
@@ -45,13 +45,14 @@ defnList align attr defns = vBox $ line <$> defns
<> (T.pack (gap label content) @@ V.defAttr)
<> (T.pack content @@ V.defAttr)
- gap a b
+ gap x y
| align == AlignRight =
- take (maxWidth - length a - length b - length sep) $
+ take (maxWidth - length x - length y - length sep) $
repeat ' '
| align == AlignLeft =
- take (maxLabelWidth - length a) $
+ take (maxLabelWidth - length x) $
repeat ' '
+ gap _ _ = " "
maxWidth = maximum $
map (\(x,y) -> length sep + length x + length y) defns