Skip to content

Commit 8301708

Browse files
fangerersgammon
authored andcommitted
Preserve pending input during terminal initialization
(cherry picked from commit 972404c)
1 parent 8724f9b commit 8301708

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/JLineConsoleHandler.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ public void initializeReadline(Value readlineModule) {
9898
Terminal terminal;
9999
Object[] signalHandlers = stashSignalHandlers();
100100
try {
101-
terminal = TerminalBuilder.builder().streams(inputStream, outputStream).system(true).build();
101+
// The grapheme capability probe consumes pending input, including commands sent through
102+
// a pseudo-terminal before readline is initialized (GR-80639).
103+
terminal = TerminalBuilder.builder().streams(inputStream, outputStream).system(true).graphemeCluster(false).build();
102104
} catch (IOException ex) {
103105
throw new RuntimeException("unexpected error opening console reader", ex);
104106
} finally {

0 commit comments

Comments
 (0)