Merge remote-tracking branch 'remotes/origin/autocomplete-async-fix'

Conflicts:
	lib/ace/autocomplete.js
This commit is contained in:
nightwing 2014-03-21 15:36:08 +04:00
commit 26f96c0ea2

View file

@ -210,8 +210,11 @@ var Autocomplete = function() {
completer.getCompletions(editor, session, pos, prefix, function(err, results) {
if (!err)
matches = matches.concat(results);
// Fetch prefix again, because they may have changed by now
var pos = editor.getCursorPosition();
var line = session.getLine(pos.row);
callback(null, {
prefix: prefix,
prefix: util.retrievePrecedingIdentifier(line, pos.column),
matches: matches,
finished: (--total === 0)
});