mirror of https://github.com/folke/lazy.nvim.git
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
This commit is contained in:
parent
460e1cd8f2
commit
e9fd76e239
|
@ -146,7 +146,7 @@ end
|
|||
---@return string, string[]
|
||||
function M.parse(args)
|
||||
local parts = vim.split(vim.trim(args), "%s+")
|
||||
if parts[1]:find("Lazy") then
|
||||
if vim.startswith("Lazy", parts[1]) then
|
||||
table.remove(parts, 1)
|
||||
end
|
||||
if args:sub(-1) == " " then
|
||||
|
|
Loading…
Reference in New Issue