RFR: 8131017: jshell tool: pasting code with tabs invokes tab completion

Jan Lahoda jan.lahoda at oracle.com
Fri May 20 10:44:52 UTC 2016


Please review.

Problem: when pasting code that contains tab characters into both jshell 
and jjs, the tab completion gets invoked on tabs instead of using the 
tab character itself.

The proposed solution is to set setCopyPasteDetection(true) on jline's 
ConsoleReader, which should enable jline's copy-paste detection, and 
avoid invoking the tab completion on paste. A limitation of the 
detection is that it cannot detect trailing tab characters, only can 
detect tab character followed by at least one more character. I hope 
that shouldn't be a big problem.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8131017

Webrev - langtools:
http://cr.openjdk.java.net/~jlahoda/8131017/langtools/webrev.00/

Webrev - nashorn:
http://cr.openjdk.java.net/~jlahoda/8131017/nashorn/webrev.00/

Thanks,
      Jan


More information about the kulla-dev mailing list