diff --git a/packages/ui/src/components/suggestions/suggestions.tsx b/packages/ui/src/components/suggestions/suggestions.tsx index 61eb58b4..412ad7a8 100644 --- a/packages/ui/src/components/suggestions/suggestions.tsx +++ b/packages/ui/src/components/suggestions/suggestions.tsx @@ -42,7 +42,11 @@ export function Suggestions() { }, [terminalText]); const textBoundsParams = useMemo( - () => new Instance("GetTextBoundsParams"), + () => { + const instance = new Instance("GetTextBoundsParams"); + instance.RichText = true; + return instance + }, [], ); 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;