Fixes asynchronous autocompleter prefix updating
Before it could happen (if an async autocompleter returned late) that the prefix used in the autocomplete was out of date. This fixes that.
This commit is contained in:
parent
408b9c527b
commit
31a32f2659
1 changed files with 18 additions and 15 deletions
|
|
@ -197,8 +197,11 @@ var Autocomplete = function() {
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
}, function() {
|
}, function() {
|
||||||
|
// Fetch prefix again, because they may have changed by now
|
||||||
|
var pos = editor.getCursorPosition();
|
||||||
|
var line = session.getLine(pos.row);
|
||||||
callback(null, {
|
callback(null, {
|
||||||
prefix: prefix,
|
prefix: util.retrievePrecedingIdentifier(line, pos.column),
|
||||||
matches: matches
|
matches: matches
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue