8169595: jshell tool: pasting multiple lines hangs input
Summary: Need to allow newlines in the user's input.
Reviewed-by: rfield
--- 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.