Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix autocompletion when there are upper letters in the name (hopefuly…

… with no bugs this time!).
  • Loading branch information...
commit c245dfe99d5ee087208f3b3564dc7a0209c776b8 1 parent 623a2ee
Benjamin Cabé kartben authored
2  ...eclipse.koneki.ldt.editor/src/org/eclipse/koneki/ldt/editor/internal/completion/LuaCompletionEngine.java
View
@@ -54,7 +54,7 @@ public void complete(IModuleSource module, int position, int k) {
ISourceModule sourceModule = (ISourceModule) modelElement;
// Retrieve start position of word current user is typing
- String start = getWordStarting(module.getSourceContents(), position).toLowerCase();
+ String start = getWordStarting(module.getSourceContents(), position);
this.requestor.beginReporting();
if (start.contains(".") || start.contains(":")) { //$NON-NLS-1$//$NON-NLS-2$
5 plugins/org.eclipse.koneki.ldt.parser/src/org/eclipse/koneki/ldt/parser/LuaASTUtils.java
View
@@ -284,7 +284,8 @@ public boolean endvisit(ASTNode node) throws Exception {
List<LocalVar> localVars = ((Block) node).getLocalVars();
for (LocalVar localVar : localVars) {
Item item = localVar.getVar();
- if (!collectedLocalVars.containsKey(item.getName()) && (start == null || item.getName().startsWith(start))) {
+ if (!collectedLocalVars.containsKey(item.getName())
+ && (start == null || item.getName().toLowerCase().startsWith(start.toLowerCase()))) {
collectedLocalVars.put(item.getName(), item);
}
}
@@ -394,7 +395,7 @@ public static Definition getDefinition(ISourceModule sourceModule, LuaExpression
// get a global var with this name
final List<Definition> definitions = new ArrayList<Definition>();
for (Item globalvar : luaSourceRoot.getFileapi().getGlobalvars().values()) {
- if (start == null || start.isEmpty() || globalvar.getName().startsWith(start))
+ if (start == null || start.isEmpty() || globalvar.getName().toLowerCase().startsWith(start.toLowerCase()))
definitions.add(new Definition(preloadedSourceModule, globalvar));
}
Please sign in to comment.
Something went wrong with that request. Please try again.