changeset 1701:7ab7fc00b147 jdk-9+120

8131017: jshell tool: pasting code with tabs invokes tab completion Summary: Enabling copy-paste detection. Reviewed-by: lagergren, sundar
author jlahoda
date Tue, 24 May 2016 16:03:48 +0200
parents 80a95fbd3e68
children 93c5020dd976 a2c78af5909e
files src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Console.java
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Console.java	Tue May 24 12:15:02 2016 +0200
+++ b/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());