8131017: jshell tool: pasting code with tabs invokes tab completion
Summary: Enabling copy-paste detection.
Reviewed-by: lagergren, sundar
--- a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Console.java Tue May 24 12:15:02 2016 +0200
+++ b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Console.java Tue May 24 16:03:48 2016 +0200
@@ -58,6 +58,7 @@
in.setExpandEvents(false);
in.setHandleUserInterrupt(true);
in.setBellEnabled(true);
+ in.setCopyPasteDetection(true);
in.setHistory(new EditingHistory(in, Files.readAllLines(historyFile.toPath())) {
@Override protected boolean isComplete(CharSequence input) {
return completer.isComplete(input.toString());