提交 6cce81ce 编写于 作者: A Alex Dima

Fixes #62835

上级 092132a0
......@@ -47,8 +47,6 @@ export const enum HoverStartMode {
export class HoverOperation<Result> {
static HOVER_TIME = 300;
private _computer: IHoverComputer<Result>;
private _state: ComputeHoverOperationState;
private _hoverTime: number;
......@@ -63,10 +61,10 @@ export class HoverOperation<Result> {
private _errorCallback?: (err: any) => void;
private _progressCallback: (progress: any) => void;
constructor(computer: IHoverComputer<Result>, success: (r: Result) => void, error: undefined | ((err: any) => void), progress: (progress: any) => void) {
constructor(computer: IHoverComputer<Result>, success: (r: Result) => void, error: undefined | ((err: any) => void), progress: (progress: any) => void, hoverTime: number) {
this._computer = computer;
this._state = ComputeHoverOperationState.IDLE;
this._hoverTime = HoverOperation.HOVER_TIME;
this._hoverTime = hoverTime;
this._firstWaitScheduler = new RunOnceScheduler(() => this._triggerAsyncComputation(), 0);
this._secondWaitScheduler = new RunOnceScheduler(() => this._triggerSyncComputation(), 0);
......
......@@ -186,7 +186,8 @@ export class ModesContentHoverWidget extends ContentHoverWidget {
this._computer,
result => this._withResult(result, true),
null,
result => this._withResult(result, false)
result => this._withResult(result, false),
this._editor.getConfiguration().contribInfo.hover.delay
);
this._register(dom.addStandardDisposableListener(this.getDomNode(), dom.EventType.FOCUS, () => {
......
......@@ -109,7 +109,8 @@ export class ModesGlyphHoverWidget extends GlyphHoverWidget {
this._computer,
(result: IHoverMessage[]) => this._withResult(result),
undefined,
(result: any) => this._withResult(result)
(result: any) => this._withResult(result),
300
);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册