Skip to content

Commit

Permalink
fix(floatFactory): increase timeout for cursor move
Browse files Browse the repository at this point in the history
  • Loading branch information
chemzqm committed Dec 7, 2020
1 parent 3255b0b commit f565111
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24026,7 +24026,7 @@ class Plugin extends events_1.EventEmitter {
});
}
get version() {
return workspace_1.default.version + ( true ? '-' + "9245f3a08c" : undefined);
return workspace_1.default.version + ( true ? '-' + "8b967b0bbd" : undefined);
}
hasAction(method) {
return this.actions.has(method);
Expand Down Expand Up @@ -25201,7 +25201,7 @@ class FloatFactory {
this.close();
}
}, null, this.disposables);
this.onCursorMoved = debounce_1.default(this._onCursorMoved.bind(this), 200);
this.onCursorMoved = debounce_1.default(this._onCursorMoved.bind(this), 300);
events_1.default.on('CursorMoved', this.onCursorMoved.bind(this, false), null, this.disposables);
events_1.default.on('CursorMovedI', this.onCursorMoved.bind(this, true), null, this.disposables);
this.disposables.push(vscode_languageserver_protocol_1.Disposable.create(() => {
Expand Down Expand Up @@ -45838,23 +45838,26 @@ class Collection {
this.name = owner;
}
set(entries, diagnostics) {
let diagnosticsPerFile = new Map();
if (!Array.isArray(entries)) {
let uri = entries;
// if called as set(uri, diagnostics)
// -> convert into single-entry entries list
entries = [[uri, diagnostics]];
let doc = workspace_1.default.getDocument(entries);
let uri = doc ? doc.uri : entries;
diagnosticsPerFile.set(uri, diagnostics);
}
let diagnosticsPerFile = new Map();
for (let item of entries) {
let [file, diagnostics] = item;
if (diagnostics == null) {
// clear diagnostics if entry contains null
diagnostics = [];
}
else {
diagnostics = (diagnosticsPerFile.get(file) || []).concat(diagnostics);
else {
for (let item of entries) {
let [uri, diagnostics] = item;
let doc = workspace_1.default.getDocument(uri);
uri = doc ? doc.uri : uri;
if (diagnostics === undefined) {
// clear diagnostics if entry contains null
diagnostics = [];
}
else {
diagnostics = (diagnosticsPerFile.get(uri) || []).concat(diagnostics);
}
diagnosticsPerFile.set(uri, diagnostics);
}
diagnosticsPerFile.set(file, diagnostics);
}
for (let item of diagnosticsPerFile) {
let [uri, diagnostics] = item;
Expand Down

0 comments on commit f565111

Please sign in to comment.