Skip to content

Commit 4359c1c

Browse files
authored
Merge pull request #308 from x1unix/fix/autofit-terminal
fix: refit terminal on font size change
2 parents 7102bb3 + 33d61e0 commit 4359c1c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/src/components/inspector/Console/Console.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ export const Console: React.FC<Props> = ({fontFamily, fontSize, status, backend}
175175
fontSize,
176176
fontFamily,
177177
};
178-
}, [theme, terminal, fontFamily, fontSize]);
178+
fitAddonRef.current.fit();
179+
}, [theme, terminal, fitAddonRef, fontFamily, fontSize]);
179180

180181
// Rendering backend
181182
useEffect(() => {

0 commit comments

Comments
 (0)