提交 a8a448d1 编写于 作者: I isidor

fixes #77837

上级 fb10f85b
......@@ -80,7 +80,7 @@ interface IPrivateReplService {
}
function revealLastElement(tree: WorkbenchAsyncDataTree<any, any, any>) {
tree.scrollTop = tree.scrollHeight - tree.renderHeight;
tree.scrollTop = Number.POSITIVE_INFINITY;
}
const sessionsToIgnore = new Set<IDebugSession>();
......@@ -799,8 +799,6 @@ class ReplDelegate implements IListVirtualDelegate<IReplElement> {
constructor(private configurationService: IConfigurationService) { }
getHeight(element: IReplElement): number {
const countNumberOfLines = (str: string) => Math.max(1, (str && str.match(/\r\n|\n/g) || []).length);
// Give approximate heights. Repl has dynamic height so the tree will measure the actual height on its own.
const config = this.configurationService.getValue<IDebugConfiguration>('debug');
const fontSize = config.console.fontSize;
......@@ -819,13 +817,13 @@ class ReplDelegate implements IListVirtualDelegate<IReplElement> {
return rowHeight;
}
let valueRows = value ? (countNumberOfLines(value) + Math.floor(value.length / 150)) : 0;
let valueRows = value ? Math.ceil(value.length / 150) : 0;
return rowHeight * valueRows;
}
if (element instanceof SimpleReplElement || element instanceof ReplEvaluationInput) {
let value = element.value;
let valueRows = countNumberOfLines(value) + Math.floor(value.length / 150);
let valueRows = Math.ceil(value.length / 150);
return valueRows * rowHeight;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册