Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use arrow keys on Windows jirb #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/java/org/jruby/ext/readline/Readline.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.nio.CharBuffer;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -119,7 +121,7 @@ protected static void initReadline(final Ruby runtime, final ConsoleHolder holde
final ConsoleReader readline;
try {
final Terminal terminal = TerminalFactory.create();
readline = holder.readline = new ConsoleReader(null, runtime.getInputStream(), runtime.getOutputStream(), terminal);
readline = holder.readline = new ConsoleReader(null, new FileInputStream(FileDescriptor.in), System.out, terminal);
} catch (IOException ioe) {
throw runtime.newIOErrorFromException(ioe);
}
Expand Down