diff --git a/packages/ui/src/components/suggestions/suggestions.tsx b/packages/ui/src/components/suggestions/suggestions.tsx index 61eb58b4..3e59a2d8 100644 --- a/packages/ui/src/components/suggestions/suggestions.tsx +++ b/packages/ui/src/components/suggestions/suggestions.tsx @@ -41,10 +41,11 @@ export function Suggestions() { return terminalText.parts[terminalText.index]; }, [terminalText]); - const textBoundsParams = useMemo( - () => new Instance("GetTextBoundsParams"), - [], - ); + const textBoundsParams = useMemo(() => { + const params = new Instance("GetTextBoundsParams"); + params.RichText = true; + return params; + }, []); // Suggestions const currentSuggestion = useSelector(selectSuggestion); diff --git a/packages/ui/src/components/suggestions/util.ts b/packages/ui/src/components/suggestions/util.ts index 2beb2186..2094949f 100644 --- a/packages/ui/src/components/suggestions/util.ts +++ b/packages/ui/src/components/suggestions/util.ts @@ -7,6 +7,8 @@ import { import { SuggestionTextBounds } from "./types"; const TEXT_BOUNDS_PARAMS = new Instance("GetTextBoundsParams"); +TEXT_BOUNDS_PARAMS.RichText = true; + const DEFAULT_BOUNDS = new Vector2(); let prevColor: Color3 | undefined; diff --git a/packages/ui/src/components/terminal-window.tsx b/packages/ui/src/components/terminal-window.tsx index 7390d434..c577ab35 100644 --- a/packages/ui/src/components/terminal-window.tsx +++ b/packages/ui/src/components/terminal-window.tsx @@ -49,6 +49,7 @@ export function TerminalWindow() { const textBoundsParams = useMemo(() => { const params = new Instance("GetTextBoundsParams"); + params.RichText = true; params.Width = math.huge; params.Font = options.font.regular; return params;