Skip to content

Commit b6e0db7

Browse files
committed
Escape strings where needed. Use the separator as an argument
separator too. Latest SublimeCompletionCommon. Should help with issue #26
1 parent 1efd1eb commit b6e0db7

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

SublimeJava.class

131 Bytes
Binary file not shown.

SublimeJava.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private static String getInstancedType(Class<?> c, String gen, String ret, Strin
4646
Matcher m = p.matcher(gen);
4747
if (m.find())
4848
{
49-
gen = m.replaceAll(m.group(1) + templateParam[i] + m.group(3));
49+
gen = m.replaceAll(Matcher.quoteReplacement(m.group(1) + templateParam[i] + m.group(3)));
5050
}
5151
}
5252
ret = gen;
@@ -76,7 +76,7 @@ private static String[] getCompletion(Method m, String filter, String[] template
7676
String ret = normal[i].getName();
7777
ret = getInstancedType(m.getDeclaringClass(), gen, ret, templateParam);
7878
str += ret;
79-
ins += "${"+count + ":" + ret + "}";
79+
ins += "${"+count + ":" + ret.replace("$", "\\$") + "}";
8080
count++;
8181
}
8282
str += ")\t" + getInstancedType(m.getDeclaringClass(), m.getGenericReturnType().toString(), m.getReturnType().getName(), templateParam);
@@ -201,7 +201,7 @@ public static void main(String... unusedargs)
201201
String cmd = in.readLine();
202202
if (cmd == null)
203203
break;
204-
String args[] = cmd.split(" ");
204+
String args[] = cmd.split(";;--;;");
205205
System.err.println(args.length);
206206
for (int i = 0; i < args.length; i++)
207207
{

sublimecompletioncommon

Submodule sublimecompletioncommon updated 2 files

0 commit comments

Comments
 (0)