提交 48fd5cbf 编写于 作者: J João Moreno

fixes #102358

上级 2d27d4d0
......@@ -316,19 +316,19 @@ class InputRenderer implements ICompressibleTreeRenderer<ISCMInput, FuzzyScore,
}
};
const initialRender = () => {
const startListeningContentHeightChange = () => {
disposables.add(templateData.inputWidget.onDidChangeContentHeight(onDidChangeContentHeight));
onDidChangeContentHeight();
};
const contentHeight = templateData.inputWidget.getContentHeight();
const contentHeight = templateData.inputWidget.getContentHeight();
if (contentHeight !== InputRenderer.DEFAULT_HEIGHT) {
const timeout = setTimeout(initialRender, 0);
disposables.add({ dispose: () => clearTimeout(timeout) });
} else {
initialRender();
}
if (contentHeight !== InputRenderer.DEFAULT_HEIGHT) {
onDidChangeContentHeight();
}
};
// Setup height change listener on next tick
const timeout = setTimeout(startListeningContentHeightChange, 0);
disposables.add({ dispose: () => clearTimeout(timeout) });
// Layout the editor whenever the outer layout happens
const layoutEditor = () => templateData.inputWidget.layout();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册