Skip to content

Commit

Permalink
Groovy REPL: fix source file package tab completion in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Apr 29, 2021
1 parent 049d24a commit 8041ffc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion groovy/src/main/java/org/jline/script/GroovyEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,8 @@ private static Set<String> sourcesForPackage(String domain) {
continue;
}
String source = p.toString();
String className = source.substring(2, source.lastIndexOf(".")).replace(separator, ".");
String className = source.substring(2, source.lastIndexOf("."))
.replace(FileSystems.getDefault().getSeparator(), ".");
if (onlyPackage) {
if (Character.isUpperCase(className.charAt(domain.length() + 1))) {
out.add(className);
Expand Down

0 comments on commit 8041ffc

Please sign in to comment.