Merge pull request #2 from jarviliam/fix_webdevicon_check

Quick fix for checking if the function 'WebDevIconsGetFileTypeSymbol' exists
This commit is contained in:
hoob3rt 2020-12-31 09:20:31 +01:00 committed by GitHub
commit 6ae335748d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ local function Branch()
return branch return branch
end end
ok = (vim.fn.exists('*WebDevIconsGetFileTypeSymbol')) ok = (vim.fn.exists('*WebDevIconsGetFileTypeSymbol'))
if ok then if ok ~= 0 then
local icon = '' local icon = ''
return icon .. ' ' .. branch return icon .. ' ' .. branch
end end

View File

@ -11,7 +11,7 @@ local function Filetype()
return filetype return filetype
end end
ok = (vim.fn.exists('*WebDevIconsGetFileTypeSymbol')) ok = (vim.fn.exists('*WebDevIconsGetFileTypeSymbol'))
if ok then if ok ~= 0 then
local icon = vim.call('WebDevIconsGetFileTypeSymbol') local icon = vim.call('WebDevIconsGetFileTypeSymbol')
return icon .. ' ' .. filetype return icon .. ' ' .. filetype
end end