Merge branch 'v3' into zmodem

This commit is contained in:
Felipe Gasper
2017-10-27 17:58:01 -05:00
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -269,6 +269,12 @@ describe('ColorManager', () => {
});
describe('setTheme', () => {
it('should not throw when not setting all colors', () => {
assert.doesNotThrow(() => {
cm.setTheme({});
});
});
it('should set a partial set of colors, using the default if not present', () => {
assert.equal(cm.colors.background, '#000000');
assert.equal(cm.colors.foreground, '#ffffff');
+3
View File
@@ -109,6 +109,9 @@ export class ColorManager implements IColorManager {
}
private _validateColor(color: string, fallback: string): string {
if (!color) {
return fallback;
}
if (color.length === 7 && color.charAt(0) === '#') {
return color;
}