From e9fd76e239cc18da289f9a3f80f35fa16b003175 Mon Sep 17 00:00:00 2001 From: Luna Saphie Mittelbach Date: Wed, 2 Oct 2024 09:52:51 +0200 Subject: [PATCH] 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 --- lua/lazy/view/commands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/view/commands.lua b/lua/lazy/view/commands.lua index 9791924..fd4af3d 100644 --- a/lua/lazy/view/commands.lua +++ b/lua/lazy/view/commands.lua @@ -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