提交 17c4ee35 编写于 作者: I isidor

debug hover: respect editor hover delay

fixes #107921
上级 7a0ae96a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册