From cde411d1b8b9539750a8dfefecc7c6b7e2ff16ad Mon Sep 17 00:00:00 2001 From: jarviliam Date: Thu, 31 Dec 2020 12:12:40 +0900 Subject: [PATCH] fixed the check if function 'WebDevIcons' exists --- lua/lualine/components/branch.lua | 2 +- lua/lualine/components/filetype.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lualine/components/branch.lua b/lua/lualine/components/branch.lua index 05a3cad..bb0ee9a 100644 --- a/lua/lualine/components/branch.lua +++ b/lua/lualine/components/branch.lua @@ -15,7 +15,7 @@ local function Branch() return branch end ok = (vim.fn.exists('*WebDevIconsGetFileTypeSymbol')) - if ok then + if ok ~= 0 then local icon = '' return icon .. ' ' .. branch end diff --git a/lua/lualine/components/filetype.lua b/lua/lualine/components/filetype.lua index 4994c3c..e28b7d6 100644 --- a/lua/lualine/components/filetype.lua +++ b/lua/lualine/components/filetype.lua @@ -11,7 +11,7 @@ local function Filetype() return filetype end ok = (vim.fn.exists('*WebDevIconsGetFileTypeSymbol')) - if ok then + if ok ~= 0 then local icon = vim.call('WebDevIconsGetFileTypeSymbol') return icon .. ' ' .. filetype end