mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-21 03:36:14 +01:00
Fixes #53152
This commit is contained in:
@@ -397,7 +397,7 @@ export interface IEditorOptions {
|
||||
/**
|
||||
* Configure the editor's hover.
|
||||
*/
|
||||
hover?: boolean | IEditorHoverOptions;
|
||||
hover?: IEditorHoverOptions;
|
||||
/**
|
||||
* Enable detecting links and making them clickable.
|
||||
* Defaults to true.
|
||||
|
||||
@@ -142,7 +142,9 @@ export class ContextMenuController implements IEditorContribution {
|
||||
// Disable hover
|
||||
const oldHoverSetting = this._editor.getConfiguration().contribInfo.hover;
|
||||
this._editor.updateOptions({
|
||||
hover: false
|
||||
hover: {
|
||||
enabled: false
|
||||
}
|
||||
});
|
||||
|
||||
let menuPosition = forcedPosition;
|
||||
|
||||
Vendored
+1
-1
@@ -2736,7 +2736,7 @@ declare namespace monaco.editor {
|
||||
/**
|
||||
* Configure the editor's hover.
|
||||
*/
|
||||
hover?: boolean | IEditorHoverOptions;
|
||||
hover?: IEditorHoverOptions;
|
||||
/**
|
||||
* Enable detecting links and making them clickable.
|
||||
* Defaults to true.
|
||||
|
||||
@@ -46,6 +46,7 @@ import { ContextSubMenu } from 'vs/base/browser/contextmenu';
|
||||
import { memoize } from 'vs/base/common/decorators';
|
||||
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { getHover } from 'vs/editor/contrib/hover/getHover';
|
||||
import { IEditorHoverOptions } from 'vs/editor/common/config/editorOptions';
|
||||
|
||||
const HOVER_DELAY = 300;
|
||||
const LAUNCH_JSON_REGEX = /launch\.json$/;
|
||||
@@ -281,7 +282,9 @@ export class DebugEditorContribution implements IDebugEditorContribution {
|
||||
private _applyHoverConfiguration(model: ITextModel, stackFrame: IStackFrame): void {
|
||||
if (stackFrame && model && model.uri.toString() === stackFrame.source.uri.toString()) {
|
||||
this.editor.updateOptions({
|
||||
hover: !stackFrame || !model || model.uri.toString() !== stackFrame.source.uri.toString()
|
||||
hover: {
|
||||
enabled: !stackFrame || !model || model.uri.toString() !== stackFrame.source.uri.toString()
|
||||
}
|
||||
});
|
||||
} else {
|
||||
let overrides: IConfigurationOverrides;
|
||||
@@ -291,9 +294,13 @@ export class DebugEditorContribution implements IDebugEditorContribution {
|
||||
overrideIdentifier: model.getLanguageIdentifier().language
|
||||
};
|
||||
}
|
||||
const defaultConfiguration = this.configurationService.getValue('editor.hover', overrides);
|
||||
const defaultConfiguration = this.configurationService.getValue<IEditorHoverOptions>('editor.hover', overrides);
|
||||
this.editor.updateOptions({
|
||||
hover: defaultConfiguration
|
||||
hover: {
|
||||
enabled: defaultConfiguration.enabled,
|
||||
delay: defaultConfiguration.delay,
|
||||
sticky: defaultConfiguration.sticky
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user