From b2774b36b7c3d9f187da59bf14ac7f57e26e3444 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 24 May 2015 15:03:21 -0700 Subject: [PATCH] readline: refactor to move tab to its own case --- lib/readline.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/readline.js b/lib/readline.js index 2cdd2cf392c71f..35fab29965ee4e 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -861,15 +861,15 @@ Interface.prototype._ttyWrite = function(s, key) { this._historyNext(); break; - default: - if (key.name === 'tab') { - // If tab completion enabled, do that... - if (typeof this.completer === 'function') { - this._tabComplete(); - break; - } + case 'tab': + // If tab completion enabled, do that... + if (typeof this.completer === 'function') { + this._tabComplete(); + break; } + // falls through + default: if (s instanceof Buffer) s = s.toString('utf-8');