@@ -36,7 +36,9 @@ function Group:contents()
3636 local items = utils .shallowcopy (self ._ .items )
3737
3838 local contents = Group .super .contents (self )
39- if not vim .tbl_isempty (contents ) then table.insert (items , Lines (contents )) end
39+ if not vim .tbl_isempty (contents ) then
40+ table.insert (items , Lines (contents ))
41+ end
4042
4143 return items
4244end
@@ -51,27 +53,35 @@ function Group:draw(layout, opts)
5153 local toppad = padding and padding .top
5254 local botpad = padding and padding .bot
5355
54- if toppad then Pad (toppad ):draw (layout ) end
56+ if toppad then
57+ Pad (toppad ):draw (layout )
58+ end
5559
5660 local items = self :contents ()
5761 for i , item in ipairs (items ) do
5862 item :draw (layout , options :get ())
59- if i ~= # items and spacing then Pad (spacing ):draw (layout ) end
63+ if i ~= # items and spacing then
64+ Pad (spacing ):draw (layout )
65+ end
6066 end
6167
62- if botpad then Pad (botpad ):draw (layout ) end
68+ if botpad then
69+ Pad (botpad ):draw (layout )
70+ end
6371end
6472
6573--- @param item lc.ui.Lines
6674function Group :insert (item )
67- if not vim .tbl_isempty (Group .super .contents (self )) then self :endgrp () end
75+ if not vim .tbl_isempty (Group .super .contents (self )) then
76+ self :endgrp ()
77+ end
6878 table.insert (self ._ .items , item )
6979
7080 return self
7181end
7282
7383function Group :append (content , highlight )
74- if type (content ) == " table" and O .is_instance (content , Group ) then --
84+ if type (content ) == " table" and O .is_instance (content , Group ) then
7585 local items = content :contents ()
7686
7787 for _ , item in ipairs (items ) do
0 commit comments