fix: invalid reference to fn

This commit is contained in:
Olivier Roques
2022-01-27 18:43:54 +01:00
parent 0913699777
commit 642d6f3314
2 changed files with 10 additions and 12 deletions

View File

@@ -95,7 +95,7 @@ local function load_sections(sections)
item = load_section(section.item),
}
end
common.echo('WarningMsg', 'Invalid section.')
common.echo('Invalid section', 'WarningMsg')
return ''
end
return vim.tbl_map(load_section, sections)
@@ -103,7 +103,7 @@ end
local function remove_hidden_sections(sections)
local filter = function(section)
return not section.hide or section.hide <= fn.winwidth(0)
return not section.hide or section.hide <= vim.fn.winwidth(0)
end
return vim.tbl_filter(filter, sections)
end