Skip to content

Commit

Permalink
make sure to enter raw mode
Browse files Browse the repository at this point in the history
  • Loading branch information
stalep committed Apr 4, 2017
1 parent 6e9ac33 commit 4a7bd9b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ public void openBlocking(String buffer) {
if (buffer != null) {
decoder.write(buffer.getBytes(charset));
}
if(attributes == null)
attributes = terminal.enterRawMode();
while (reading) {
int read = terminal.input().read(bBuf);
if (read > 0) {
Expand Down

1 comment on commit 4a7bd9b

@gnodet
Copy link
Contributor

@gnodet gnodet commented on 4a7bd9b Apr 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When they are executed, commands should have the terminal in canonical mode rather than raw mode. The canonical mode is the default one, and I don't really see why this should not be the case here. It would be better to have the raw mode entered and exited for the time used to actually read the line, so imho it should be controlled by Readline instead.

I've raised #17 to capture that.

Please sign in to comment.