From 05a2fa27a32d7ce3d8fabe0da23ea1b6bfd07183 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Wed, 31 May 2017 01:21:48 +0800 Subject: [PATCH] widen CLI parse error code fragment displayed 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, " ") + "^");