提交 b587ce5f 编写于 作者: J Johannes Rieken

also debounce quick fix request when markers change, #24066

上级 b912ab9b
...@@ -25,11 +25,11 @@ export class QuickFixOracle { ...@@ -25,11 +25,11 @@ export class QuickFixOracle {
private _editor: ICommonCodeEditor, private _editor: ICommonCodeEditor,
private _markerService: IMarkerService, private _markerService: IMarkerService,
private _signalChange: (e: QuickFixComputeEvent) => any, private _signalChange: (e: QuickFixComputeEvent) => any,
cursorChangeDebounce: number = 250 delay: number = 250
) { ) {
this._disposables.push( this._disposables.push(
this._markerService.onMarkerChanged(e => this._onMarkerChanges(e)), debounceEvent(this._markerService.onMarkerChanged, (last, cur) => last ? last.concat(cur) : cur, delay / 2)(e => this._onMarkerChanges(e)),
debounceEvent(this._editor.onDidChangeCursorPosition, last => last, cursorChangeDebounce)(e => this._onCursorChange()) debounceEvent(this._editor.onDidChangeCursorPosition, last => last, delay)(e => this._onCursorChange())
); );
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册