Skip to content

Commit 9ffcf25

Browse files
authored
fix: return previous color state from setColorsEnabled (#3002)
1 parent 327423b commit 9ffcf25

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NOTICE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ under the licensing terms detailed in LICENSE:
6262
* Kam Chehresa <kaz.che@gmail.com>
6363
* Mopsgamer <79159094+Mopsgamer@users.noreply.github.com>
6464
* EDM115 <github@edm115.dev>
65+
* Weixie Cui <cuiweixie@gmail.com>
6566

6667
Portions of this software are derived from third-party works licensed under
6768
the following terms:

src/util/terminal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function isColorsEnabled(): bool {
3232

3333
/** Sets whether terminal colors are enabled or not. */
3434
export function setColorsEnabled(isEnabled: bool): bool {
35-
let wasEnabled = isEnabled;
35+
let wasEnabled = colorsEnabled;
3636
colorsEnabled = isEnabled;
3737
return wasEnabled;
3838
}

0 commit comments

Comments
 (0)