Skip to content

Commit cc4fd77

Browse files
committed
fix: return previous color state from setColorsEnabled
setColorsEnabled incorrectly assigned wasEnabled from the new value instead of the previous colorsEnabled flag.
1 parent 327423b commit cc4fd77

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)