turn off force complete when editor content changes

This commit is contained in:
Aviral Dasgupta 2017-02-10 23:44:04 +05:30
parent e65744abdc
commit 2d39b25334
No known key found for this signature in database
GPG key ID: 5FD1E9F4FFD3DA80

View file

@ -75,11 +75,11 @@ export default class Autocomplete extends React.Component {
} else { } else {
selectionOffset++; // selectionOffset is 1-indexed! selectionOffset++; // selectionOffset is 1-indexed!
} }
} else {
// If no completions were returned, we should turn off force completion.
forceComplete = false;
} }
// If no completions were returned, we should turn off force completion.
forceComplete = false;
let hide = this.state.hide; let hide = this.state.hide;
// These are lists of booleans that indicate whether whether the corresponding provider had a matching pattern // These are lists of booleans that indicate whether whether the corresponding provider had a matching pattern
const oldMatches = this.state.completions.map((completion) => !!completion.command.command), const oldMatches = this.state.completions.map((completion) => !!completion.command.command),