Skip to content

Instantly share code, notes, and snippets.

@TooTallNate
Created January 30, 2013 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TooTallNate/f18ba69d227e103d822e to your computer and use it in GitHub Desktop.
Save TooTallNate/f18ba69d227e103d822e to your computer and use it in GitHub Desktop.
diff --git a/lib/readline.js b/lib/readline.js
index d87d3a3..8bb60d2 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -734,6 +734,7 @@ Interface.prototype._ttyWrite = function(s, key) {
/* No modifier keys used */
switch (key.name) {
+ case 'return': // carriage return, i.e. \r
case 'enter':
this._line();
break;
@@ -758,7 +759,6 @@ Interface.prototype._ttyWrite = function(s, key) {
this._moveCursor(+1);
break;
- case 'return': // carriage return, i.e. \r
case 'home':
this._moveCursor(-Infinity);
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment