diff --git a/lib/readline.js b/lib/readline.js index 479db9bdf044ad..f1cb6b8678f1b0 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -472,7 +472,7 @@ Interface.prototype._tabComplete = function(lastKeypressWasTab) { maxColumns = 1; } var group = []; - for (var i = 0, compLen = completions.length; i < compLen; i++) { + for (var i = 0; i < completions.length; i++) { var c = completions[i]; if (c === '') { handleGroup(self, group, width, maxColumns); @@ -511,7 +511,7 @@ function handleGroup(self, group, width, maxColumns) { var item = group[idx]; self._writeToOutput(item); if (col < maxColumns - 1) { - for (var s = 0, itemLen = item.length; s < width - itemLen; s++) { + for (var s = 0; s < width - item.length; s++) { self._writeToOutput(' '); } }