Skip to content

Commit

Permalink
fix #50700
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed May 30, 2018
1 parent 4fdf5e8 commit 892194d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,17 @@ class RequestOracle {
this._callback(codeEditor, undefined);

let handle: number;
let listener = codeEditor.onDidChangeModelContent(event => {
let contentListener = codeEditor.onDidChangeModelContent(event => {
handle = setTimeout(() => this._callback(codeEditor, event), 150);
});
let modeListener = codeEditor.onDidChangeModelLanguage(_ => {
this._callback(codeEditor, undefined);
});
this._sessionDisposable = {
dispose() {
listener.dispose();
contentListener.dispose();
clearTimeout(handle);
modeListener.dispose();
}
};
}
Expand Down

0 comments on commit 892194d

Please sign in to comment.