From dd2d7c1b30c201ff0e24cb214aaf684b7701d0d9 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Fri, 1 Sep 2017 17:41:49 -0600 Subject: [PATCH] Quote builder without 'bounce' in ANSI mode --- core/message.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/message.js b/core/message.js index 50f3acb4..710444ce 100644 --- a/core/message.js +++ b/core/message.js @@ -523,11 +523,10 @@ Message.prototype.getQuoteLines = function(options, cb) { // strip colors, colorize the lines, etc. If we exclude the prefixes, this seems to do // the trick and allow them to leave them alone! // - // :TODO: The way this bumps to the right is super annoying -- it would be nice to just invert the entire line split.forEach(l => { quoteLines.push(`${lastSgr}${l}`); - focusQuoteLines.push(`${options.ansiFocusPrefixSgr}>${lastSgr}${renderSubstr(l, 0, l.length - 2)}`); + focusQuoteLines.push(`${options.ansiFocusPrefixSgr}>${lastSgr}${renderSubstr(l, 1, l.length - 1)}`); lastSgr = (l.match(/(?:\x1b\x5b)[\?=;0-9]*m(?!.*(?:\x1b\x5b)[\?=;0-9]*m)/) || [])[0] || ''; // eslint-disable-line no-control-regex });