Skip to content

Commit e9fd76e

Browse files
authored
fix(completion): check if command string is a prefix of Lazy (#1760)
Problem: Command completion doesn't work if the command name isn't written in full Solution: Use vim.startswith to check if the command is a prefix of 'Lazy' Fixes #1758
1 parent 460e1cd commit e9fd76e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/lazy/view/commands.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ end
146146
---@return string, string[]
147147
function M.parse(args)
148148
local parts = vim.split(vim.trim(args), "%s+")
149-
if parts[1]:find("Lazy") then
149+
if vim.startswith("Lazy", parts[1]) then
150150
table.remove(parts, 1)
151151
end
152152
if args:sub(-1) == " " then

0 commit comments

Comments
 (0)