projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8ffbcd
)
fix breakpoint prefixing in list()
author
Fedor Indutny
<fedor.indutny@gmail.com>
Sat, 17 Sep 2011 08:38:06 +0000
(15:38 +0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Tue, 20 Sep 2011 15:35:15 +0000
(08:35 -0700)
lib/_debugger.js
patch
|
blob
|
history
diff --git
a/lib/_debugger.js
b/lib/_debugger.js
index 9e1c5844cd7a9b437d0dbf38aebbcbbcc7fe09ff..3e28a3f4cb666633d362fbc1db4a50ed15347f64 100644
(file)
--- a/
lib/_debugger.js
+++ b/
lib/_debugger.js
@@
-922,13
+922,17
@@
function intChars(n) {
// Adds spaces and prefix to number
function leftPad(n, prefix) {
- var s = n.toString();
- var nchars = intChars(n);
- var nspaces = nchars - s.length;
+ var s = n.toString(),
+ nchars = intChars(n),
+ nspaces = nchars - s.length - 1;
+
+ prefix || (prefix = ' ');
+
for (var i = 0; i < nspaces; i++) {
-
s = (prefix || ' ') + s
;
+
prefix += ' '
;
}
- return s;
+
+ return prefix + s;
}