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, " ")} );