We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b1928e commit f2279d9Copy full SHA for f2279d9
1 file changed
implement-shell-tools/cat/cat.js
@@ -37,7 +37,8 @@ const numberAll = options.number && !numberNonBlank;
37
}
38
39
} else if (numberAll) {
40
- const maxDigits = String(lines.length * filePaths.length).length; // max digits to pad across files
+ const maxDigits = totalLines > 0 ? String(totalLines).length : 1;
41
+
42
43
for (const line of lines) {
44
const numStr = String(lineNumber++).padStart(maxDigits, " ");
0 commit comments