Skip to content

Commit c45e0e4

Browse files
committed
fix(autocomplete) the hacky workaround for https://github.com/atom-community/autocomplete-plus/issues/329 results in an infinite loop
I'll just wait for a fix in autocomplete-plus or a better idea.
1 parent 0fc90f2 commit c45e0e4

File tree

3 files changed

+2
-26
lines changed

3 files changed

+2
-26
lines changed

dist/main/atom/autoCompleteProvider.js

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main/atom/autoCompleteProvider.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/main/atom/autoCompleteProvider.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,6 @@ export function triggerAutocompletePlus() {
7272
'autocomplete-plus:activate');
7373
}
7474

75-
var pendingActivation = false;
76-
function delayTriggerAutocompletePlus() {
77-
if (pendingActivation) return;
78-
pendingActivation = true;
79-
setTimeout(() => {
80-
triggerAutocompletePlus();
81-
pendingActivation = false;
82-
}, 50);
83-
}
84-
85-
8675
// the structure stored in the CSON snippet file
8776
interface SnippetDescriptor {
8877
prefix: string;
@@ -180,14 +169,12 @@ export var provider: autocompleteplus.Provider = {
180169
maxSuggestions: atomConfig.maxSuggestions
181170
})
182171
.then((resp) => {
172+
183173
var completionList = resp.completions;
184174
var suggestions = completionList.map((c): autocompleteplus.Suggestion => {
185175

186176
if (c.snippet) // currently only function completions are snippet
187177
{
188-
// TODO: remove once https://github.com/atom-community/autocomplete-plus/issues/329 is solved
189-
delayTriggerAutocompletePlus();
190-
191178
return {
192179
snippet: c.snippet,
193180
replacementPrefix: '',

0 commit comments

Comments
 (0)