提交 c460e31c 编写于 作者: S Sandeep Somavarapu

fix #67573

上级 a1c170cd
......@@ -93,6 +93,9 @@ class MessageWidget {
lastLineElement = document.createElement('div');
lastLineElement.innerText = line;
this._editor.applyFontInfo(lastLineElement);
if (line === '') {
lastLineElement.style.height = lastLineElement.style.lineHeight;
}
this._messageBlock.appendChild(lastLineElement);
}
if (source || code) {
......
......@@ -473,7 +473,7 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
const messageElement = dom.append(hoverElement, $('span'));
messageElement.style.whiteSpace = 'pre-wrap';
messageElement.innerText = message.trim();
messageElement.innerText = message;
this._editor.applyFontInfo(messageElement);
if (source || code) {
......
......@@ -90,15 +90,17 @@ const enum TemplateId {
export class VirtualDelegate implements IListVirtualDelegate<TreeElement> {
static LINE_HEIGHT: number = 22;
constructor(private readonly markersViewState: MarkersViewModel) { }
getHeight(element: TreeElement): number {
if (element instanceof Marker) {
const viewModel = this.markersViewState.getViewModel(element);
const noOfLines = !viewModel || viewModel.multiline ? element.lines.length : 1;
return noOfLines * 22;
return noOfLines * VirtualDelegate.LINE_HEIGHT;
}
return 22;
return VirtualDelegate.LINE_HEIGHT;
}
getTemplateId(element: TreeElement): string {
......@@ -321,6 +323,9 @@ class MarkerWidget extends Disposable {
lastLineElement = dom.append(messageContainer, dom.$('.marker-message-line'));
const highlightedLabel = new HighlightedLabel(lastLineElement, false);
highlightedLabel.set(lines[index], lineMatches[index]);
if (lines[index] === '') {
lastLineElement.style.height = `${VirtualDelegate.LINE_HEIGHT}px`;
}
}
this.renderDetails(marker, filterData, multiline ? lastLineElement : this.messageAndDetailsContainer);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册