Fix issue #51 - tab completion reporting incorrect globals
This commit is contained in:
parent
4a586a115c
commit
b34d456427
1 changed files with 4 additions and 3 deletions
|
@ -315,7 +315,7 @@ var server = org.bukkit.Bukkit.server;
|
||||||
if (statement.length == 0)
|
if (statement.length == 0)
|
||||||
propsOfLastArg = _globalSymbols;
|
propsOfLastArg = _globalSymbols;
|
||||||
else{
|
else{
|
||||||
var statementSyms = statement.split(/[^a-zA-Z0-9_\.]/);
|
var statementSyms = statement.split(/[^\$a-zA-Z0-9_\.]/);
|
||||||
var lastSymbol = statementSyms[statementSyms.length-1];
|
var lastSymbol = statementSyms[statementSyms.length-1];
|
||||||
//
|
//
|
||||||
// try to complete the object ala java IDEs.
|
// try to complete the object ala java IDEs.
|
||||||
|
@ -359,8 +359,9 @@ var server = org.bukkit.Bukkit.server;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
var objectProps = _getProperties(symbol);
|
var objectProps = _getProperties(symbol);
|
||||||
for (var i = 0; i < objectProps.length; i++)
|
for (var i = 0; i < objectProps.length; i++){
|
||||||
propsOfLastArg.push(statement + objectProps[i]);
|
propsOfLastArg.push(statement + "." + objectProps[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
// loop thru globalSymbols looking for a good match
|
// loop thru globalSymbols looking for a good match
|
||||||
|
|
Reference in a new issue