Skip to content

Commit

Permalink
fix(statusline): handle invalid position
Browse files Browse the repository at this point in the history
  • Loading branch information
lucobellic committed Feb 1, 2024
1 parent 8c7b0a6 commit ae31134
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/edgy-group/stl/statusline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ end
function M.get_statusline(position)
local statusline = {}
local edgebar = Config and Config.layout and Config.layout[position]
local g = Group.groups_by_pos
if edgebar then
local indexed_groups = g and g[position] or 1
local indexed_groups = Group.groups_by_pos and Group.groups_by_pos[position]
if edgebar and indexed_groups then
for index, group_line in ipairs(M.cache.status_lines[position]) do
local is_visible = edgebar.visible ~= 0 and index == indexed_groups.selected_index
local highlight = M.get_highlight(is_visible)
Expand Down

0 comments on commit ae31134

Please sign in to comment.