From 6f869932e08886bbec13871ca6172d5e8466b4cd Mon Sep 17 00:00:00 2001 From: Chapman Pendery Date: Thu, 5 Oct 2023 08:15:24 -0700 Subject: [PATCH] fix: remove custom pad method Signed-off-by: Chapman Pendery --- src/ui/suggestions.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ui/suggestions.tsx b/src/ui/suggestions.tsx index 4b7518c..44b2781 100644 --- a/src/ui/suggestions.tsx +++ b/src/ui/suggestions.tsx @@ -7,10 +7,6 @@ const DescriptionWidth = 30; const BorderWidth = 2; const ActiveSuggestionBackgroundColor = "#7D56F4"; -const rightPad = (str: string, len: number) => { - return str + " ".repeat(len - str.length); -}; - function Description({ description }: { description: string }) { if (description.length !== 0) { return ( @@ -46,7 +42,7 @@ function SuggestionList({ return ( - {rightPad(name, SuggestionWidth - BorderWidth)} + {name.padEnd(SuggestionWidth - BorderWidth, " ")} );