mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
parent
7a0ae96a0f
commit
17c4ee352d
|
@ -39,7 +39,6 @@ import { HoverStartMode } from 'vs/editor/contrib/hover/hoverOperation';
|
|||
import { IHostService } from 'vs/workbench/services/host/browser/host';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
|
||||
const HOVER_DELAY = 300;
|
||||
const LAUNCH_JSON_REGEX = /\.vscode\/launch\.json$/;
|
||||
const INLINE_VALUE_DECORATION_KEY = 'inlinevaluedecoration';
|
||||
const MAX_NUM_INLINE_VALUES = 100; // JS Global scope can have 700+ entries. We want to limit ourselves for perf reasons
|
||||
|
@ -329,11 +328,12 @@ export class DebugEditorContribution implements IDebugEditorContribution {
|
|||
|
||||
@memoize
|
||||
private get showHoverScheduler(): RunOnceScheduler {
|
||||
const hoverOption = this.editor.getOption(EditorOption.hover);
|
||||
const scheduler = new RunOnceScheduler(() => {
|
||||
if (this.hoverRange) {
|
||||
this.showHover(this.hoverRange, false);
|
||||
}
|
||||
}, HOVER_DELAY);
|
||||
}, hoverOption.delay);
|
||||
this.toDispose.push(scheduler);
|
||||
|
||||
return scheduler;
|
||||
|
@ -341,11 +341,12 @@ export class DebugEditorContribution implements IDebugEditorContribution {
|
|||
|
||||
@memoize
|
||||
private get hideHoverScheduler(): RunOnceScheduler {
|
||||
const hoverOption = this.editor.getOption(EditorOption.hover);
|
||||
const scheduler = new RunOnceScheduler(() => {
|
||||
if (!this.hoverWidget.isHovered()) {
|
||||
this.hoverWidget.hide();
|
||||
}
|
||||
}, 2 * HOVER_DELAY);
|
||||
}, hoverOption.delay);
|
||||
this.toDispose.push(scheduler);
|
||||
|
||||
return scheduler;
|
||||
|
|
Loading…
Reference in a new issue