8131017: jshell tool: pasting code with tabs invokes tab completion
authorjlahoda
Tue, 24 May 2016 16:03:48 +0200
changeset 38494 52305229ea03
parent 38493 9517b1ab4029
child 38495 1df97b2627ec
8131017: jshell tool: pasting code with tabs invokes tab completion Summary: Enabling copy-paste detection. Reviewed-by: lagergren, sundar
nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Console.java
--- 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());