fix: notice not being shown in lualine if it doesn't end with \n

This commit is contained in:
shadmansaleh 2022-07-31 23:10:56 +06:00
parent 6d11f9f508
commit bd52d2d77e
1 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,9 @@ function M.add_notice(notice)
if type(notice) == 'string' then if type(notice) == 'string' then
notice = vim.split(notice, '\n') notice = vim.split(notice, '\n')
end end
if notice[#notice] ~= '' then
notice[#notice+1] = ''
end
table.insert(notices, notice) table.insert(notices, notice)
end end