mirror of
https://github.com/wavetermdev/inshellisense.git
synced 2026-08-05 13:43:30 -07:00
fix: remove custom pad method
Signed-off-by: Chapman Pendery <cpendery@vt.edu>
This commit is contained in:
@@ -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 (
|
||||
<Box key={idx}>
|
||||
<Text backgroundColor={bgColor} wrap="truncate-end">
|
||||
{rightPad(name, SuggestionWidth - BorderWidth)}
|
||||
{name.padEnd(SuggestionWidth - BorderWidth, " ")}
|
||||
</Text>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user