From 55b5f2a8aa90a69e523c0a53ca92fcef45e5b209 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 31 May 2017 01:56:52 +0800 Subject: widen CLI parse error code fragment displayed (#2032) fixes #2030 --- bin/uglifyjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/uglifyjs b/bin/uglifyjs index a2039f7e..ef2020c5 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -225,9 +225,10 @@ function run() { col = line.length; } if (line) { - if (col > 40) { - line = line.slice(col - 40); - col = 40; + var limit = 78; + if (col > limit) { + line = line.slice(col - limit); + col = limit; } console.error(line.slice(0, 80)); console.error(line.slice(0, col).replace(/\S/g, " ") + "^"); -- cgit v1.2.3