Skip to content

Commit

Permalink
GroovyEngine: fixed chained method tab completion
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Jun 30, 2020
1 parent 99e5efe commit d2ac4ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion groovy/src/main/java/org/jline/script/GroovyEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public void complete(LineReader reader, ParsedLine commandLine, List<Candidate>
int eqsep = Helpers.statementBegin(brackets);
if (brackets.numberOfRounds() > 0 && brackets.lastCloseRound() > eqsep) {
int varsep = buffer.lastIndexOf('.');
if (varsep > 0 && varsep > eqsep) {
if (varsep > 0 && varsep > brackets.lastCloseRound()) {
Class<?> clazz = evaluateClass(buffer.substring(eqsep + 1, varsep));
int vs = wordbuffer.lastIndexOf('.');
String curBuf = wordbuffer.substring(0, vs + 1);
Expand Down

0 comments on commit d2ac4ef

Please sign in to comment.