Make InputHandler parseAnsiColorChange private

This commit is contained in:
Slawek Zachcial
2020-11-29 16:30:05 +01:00
parent 4c6dc45d20
commit 52b64beefc
2 changed files with 9 additions and 14 deletions
+2 -4
View File
@@ -2714,9 +2714,7 @@ export class InputHandler extends Disposable implements IInputHandler {
this._iconName = data;
}
// This is really an internal method and not part of IInputHandler implementation.
// Making it public so that I can test it.
public parseAnsiColorChange(data: string): IAnsiColorChangeEvent | null {
private _parseAnsiColorChange(data: string): IAnsiColorChangeEvent | null {
// example data: 5;rgb:aa/bb/cc
const regex = /(\d+);rgb:([0-9a-fA-F]{2})\/([0-9a-fA-F]{2})\/([0-9a-fA-F]{2})/;
const match = data.match(regex);
@@ -2739,7 +2737,7 @@ export class InputHandler extends Disposable implements IInputHandler {
* `c` is the color index between 0 and 255. `spec` color format is 'rgb:hh/hh/hh' where `h` are hexadecimal digits.
*/
public setAnsiColor(data: string): void {
const event = this.parseAnsiColorChange(data);
const event = this._parseAnsiColorChange(data);
if (event) {
this._onAnsiColorChange.fire(event);
}