]> git.wincent.com - pinnacle.git/commitdiff
fix: explicitly check vim.fn.has() value
authorKhue Nguyen <Z5483Y@gmail.com>
Fri, 9 Apr 2021 17:04:58 +0000 (13:04 -0400)
committerKhue Nguyen <Z5483Y@gmail.com>
Fri, 9 Apr 2021 17:04:58 +0000 (13:04 -0400)
lua/wincent/pinnacle.lua

index 585f522accd3158d4fd1ab5945f846534406f4e9..33a07a575c5366225a5508d024aa9bf3bb2a416d 100644 (file)
@@ -2,9 +2,9 @@ local pinnacle = {}
 
 local prefix = 'cterm'
 
-if vim.fn.has('gui') then
+if vim.fn.has('gui') == 1 then
   prefix = 'gui'
-elseif vim.fn.has('termguicolors') and vim.api.nvim_get_option('termguicolors') then
+elseif vim.fn.has('termguicolors') == 1 and vim.api.nvim_get_option('termguicolors') then
   prefix = 'gui'
 end