8169595: jshell tool: pasting multiple lines hangs input
authorjlahoda
Mon, 14 Nov 2016 10:07:10 +0100
changeset 41970 4128b2c679bd
parent 41969 e4c2f100927f
child 41971 d94dec08aecc
8169595: jshell tool: pasting multiple lines hangs input Summary: Need to allow newlines in the user's input. Reviewed-by: rfield
jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java
--- a/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java	Fri Nov 11 13:11:27 2016 +0000
+++ b/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java	Mon Nov 14 10:07:10 2016 +0100
@@ -3222,7 +3222,7 @@
     }
     //where:
         private Pattern CURSOR_COLUMN_PATTERN =
-                Pattern.compile("(?<prefix>.*)\033\\[[0-9]+;(?<column>[0-9]+)R");
+                Pattern.compile("(?<prefix>.*)\033\\[[0-9]+;(?<column>[0-9]+)R", Pattern.DOTALL);
 
     /**
      * Read a line for unsupported terminals.