Skip to content

Commit d78646d

Browse files
committed
fix: correct conditional check
Because in Lua, `0` is truthy. Only `nil` and `false` are falsey.
1 parent f8cbc57 commit d78646d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/wincent/commandt/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ local default_options = {
497497
local helptags = {}
498498
local tagfiles = vim.api.nvim_get_runtime_file('doc/tags', true)
499499
for _, tagfile in ipairs(tagfiles) do
500-
if vim.fn.filereadable(tagfile) then
500+
if vim.fn.filereadable(tagfile) == 1 then
501501
for _, tag in ipairs(vim.fn.readfile(tagfile)) do
502502
local _, _, tag_text = tag:find('^%s*(%S+)%s+')
503503
if tag_text ~= nil then

0 commit comments

Comments
 (0)