Skip to content

Commit

Permalink
fix(utils): is_uri empty path
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestrew committed Aug 28, 2023
1 parent 1dfa66b commit f6f7a90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lua/telescope/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ utils.is_path_hidden = function(opts, path_display)
end

utils.is_uri = function(filename)
local char = string.byte(filename, 1)
local char = string.byte(filename, 1) or 0

-- is alpha?
if char < 65 or (char > 90 and char < 97) or char > 122 then
Expand Down
1 change: 1 addition & 0 deletions lua/tests/automated/utils_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe("is_uri", function()
"hello",
"hello:",
"123",
"",
}
for _, input in ipairs(inputs) do
it(input, function()
Expand Down

0 comments on commit f6f7a90

Please sign in to comment.