mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
VSCode merge (#4610)
* Merge from vscode e388c734f30757875976c7e326d6cfeee77710de * fix yarn lcoks * remove small issue
This commit is contained in:
@@ -23,7 +23,7 @@ import { HoverOperation, HoverStartMode, IHoverComputer } from 'vs/editor/contri
|
||||
import { ContentHoverWidget } from 'vs/editor/contrib/hover/hoverWidgets';
|
||||
import { MarkdownRenderer } from 'vs/editor/contrib/markdown/markdownRenderer';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { coalesce, isNonEmptyArray } from 'vs/base/common/arrays';
|
||||
import { coalesce, isNonEmptyArray, asArray } from 'vs/base/common/arrays';
|
||||
import { IMarker, IMarkerData, MarkerSeverity } from 'vs/platform/markers/common/markers';
|
||||
import { basename } from 'vs/base/common/resources';
|
||||
import { IMarkerDecorationsService } from 'vs/editor/common/services/markersDecorationService';
|
||||
@@ -148,16 +148,7 @@ class ModesContentComputer implements IHoverComputer<HoverPart[]> {
|
||||
return null;
|
||||
}
|
||||
|
||||
let contents: IMarkdownString[] = [];
|
||||
|
||||
if (d.options.hoverMessage) {
|
||||
if (Array.isArray(d.options.hoverMessage)) {
|
||||
contents = [...d.options.hoverMessage];
|
||||
} else {
|
||||
contents = [d.options.hoverMessage];
|
||||
}
|
||||
}
|
||||
|
||||
const contents: IMarkdownString[] = d.options.hoverMessage ? asArray(d.options.hoverMessage) : [];
|
||||
return { contents, range };
|
||||
}
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@ import { GlyphHoverWidget } from 'vs/editor/contrib/hover/hoverWidgets';
|
||||
import { MarkdownRenderer } from 'vs/editor/contrib/markdown/markdownRenderer';
|
||||
import { IModeService } from 'vs/editor/common/services/modeService';
|
||||
import { IOpenerService, NullOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { asArray } from 'vs/base/common/arrays';
|
||||
|
||||
export interface IHoverMessage {
|
||||
value: IMarkdownString;
|
||||
@@ -62,11 +63,7 @@ class MarginComputer implements IHoverComputer<IHoverMessage[]> {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Array.isArray(hoverMessage)) {
|
||||
result.push(...hoverMessage.map(toHoverMessage));
|
||||
} else {
|
||||
result.push(toHoverMessage(hoverMessage));
|
||||
}
|
||||
result.push(...asArray(hoverMessage).map(toHoverMessage));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user