fix(terminal): preserve animation-frame first fit

This commit is contained in:
Gabriel Brown
2026-07-10 17:06:33 -04:00
parent 75d06394ce
commit feb3723753
3 changed files with 47 additions and 4 deletions
@@ -12,10 +12,17 @@ export const scheduleTerminalFits = (deps: {
deps.sendResize();
};
deps.raf(refit);
void deps.fontsReady.then(refit).catch(() => undefined);
void deps
.loadNerdFont()
const initialFit = new Promise<void>((resolve) => {
deps.raf(() => {
refit();
resolve();
});
});
void Promise.all([deps.fontsReady, initialFit])
.then(refit)
.catch(() => undefined);
void Promise.all([deps.loadNerdFont(), initialFit])
.then(refit)
.catch(() => undefined);
};