From e42bd117255ec006b68862edf295519e1c71a106 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sat, 13 Mar 2021 21:38:03 +0100 Subject: [PATCH] made progress detection optional - fixes #3472 --- terminus-terminal/src/api/baseTerminalTab.component.ts | 2 +- terminus-terminal/src/config.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/terminus-terminal/src/api/baseTerminalTab.component.ts b/terminus-terminal/src/api/baseTerminalTab.component.ts index e0c1c173..19646515 100644 --- a/terminus-terminal/src/api/baseTerminalTab.component.ts +++ b/terminus-terminal/src/api/baseTerminalTab.component.ts @@ -330,7 +330,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit } const percentageMatch = /(^|[^\d])(\d+(\.\d+)?)%([^\d]|$)/.exec(data) - if (!this.alternateScreenActive && percentageMatch) { + if (!this.alternateScreenActive && percentageMatch && this.config.store.terminal.detectProgress) { const percentage = percentageMatch[3] ? parseFloat(percentageMatch[2]) : parseInt(percentageMatch[2]) if (percentage > 0 && percentage <= 100) { this.setProgress(percentage) diff --git a/terminus-terminal/src/config.ts b/terminus-terminal/src/config.ts index 2b24827c..6452ad8f 100644 --- a/terminus-terminal/src/config.ts +++ b/terminus-terminal/src/config.ts @@ -74,6 +74,7 @@ export class TerminalConfigProvider extends ConfigProvider { wholeWord: false, caseSensitive: false, }, + detectProgress: true, }, }