From 4ff15512f571622e879680ab02010be92e4bb040 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Tue, 20 Sep 2011 15:18:05 +0700 Subject: [PATCH] remove arrow from current source line --- lib/_debugger.js | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index 1f6f9fe7d5e..69970bf3082 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -977,23 +977,17 @@ Interface.prototype.list = function() { lines[i] = lines[i].slice(wrapper.length); } - var breakpoint = client.breakpoints.some(function(bp) { - return bp.script === client.currentScript && - bp.line == lineno; - }); + var current = lineno == 1 + client.currentSourceLine, + breakpoint = client.breakpoints.some(function(bp) { + return bp.script === client.currentScript && + bp.line == lineno; + }), + line = current ? + SourceUnderline(lines[i], client.currentSourceColumn) + : + lines[i]; - if (lineno == 1 + client.currentSourceLine) { - var nchars = intChars(lineno), - pointer = breakpoint ? '*' : '='; - for (var j = 1; j < nchars - 1; j++) { - pointer += '='; - } - pointer += '>'; - self.print(pointer + ' ' + - SourceUnderline(lines[i], client.currentSourceColumn)); - } else { - self.print(leftPad(lineno, breakpoint && '*') + ' ' + lines[i]); - } + self.print(leftPad(lineno, breakpoint && '*') + ' ' + line); } self.resume(); });