Skip to content

Commit

Permalink
Merge pull request #1504 from Theodus/readline
Browse files Browse the repository at this point in the history
Readline interpret C-d on empty line as EOF
  • Loading branch information
SeanTAllen authored Jan 10, 2017
2 parents a7e9a67 + b511a69 commit b7a4605
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/term/readline.pony
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ class Readline is ANSINotify
match input
| 0x01 => home() // ctrl-a
| 0x02 => left() // ctrl-b
| 0x04 => delete() // ctrl-d
| 0x04 =>
// ctrl-d
if _edit.size() == 0 then
_out.write("\n")
term.dispose()
else
delete()
end
| 0x05 => end_key() // ctrl-e
| 0x06 => right() // ctrl-f
| 0x08 => _backspace() // ctrl-h
Expand Down

0 comments on commit b7a4605

Please sign in to comment.