Conversation
|
Hi, Please merge it, this feature is much appreciated ! |
|
Very good this feature, as I usually change the color currently I need to do it manually, it would help a lot to automate that way. |
PumpedSardines
left a comment
There was a problem hiding this comment.
If we're gonna implement this feature, shouldn't we support split terminals from the start? This seems like a weird implementation
| if (terminalWindow.splitTerminals[0]?.color) { | ||
| color = TerminalColor[terminalWindow.splitTerminals[0].color]; | ||
| } |
There was a problem hiding this comment.
You need to check that terminalWindow.splitTerminals[0]?.color is an actual color and not something random the user has inputed. Otherwise color will be undefined.
There was a problem hiding this comment.
In any case, it falls back to white
|
|
||
| term = vscode.window.createTerminal({ | ||
| name: name, | ||
| color: new vscode.ThemeColor(color), |
There was a problem hiding this comment.
I'm not sure what happens if you call vscode.ThemeColor constructor with undefined, but it's better to ensure that color never is white instead of undefined.
| export enum TerminalColor { | ||
| "black" = "terminal.ansiBlack", | ||
| "red" = "terminal.ansiRed", | ||
| "green" = "terminal.ansiGreen", | ||
| "yellow" = "terminal.ansiYellow", | ||
| "blue" = "terminal.ansiBlue", | ||
| "magenta" = "terminal.ansiMagenta", | ||
| "cyan" = "terminal.ansiCyan", | ||
| "white" = "terminal.ansiWhite", | ||
| } |
There was a problem hiding this comment.
Why put this in an enum if you're gonna use it like a map? Imo it's better to do a readonly object.
| "@types/node": "^13.11.0", | ||
| "@types/text-encoding": "^0.0.35", | ||
| "@types/vscode": "^1.46.0", | ||
| "@types/vscode": "^1.67.0", |
There was a problem hiding this comment.
Is it required to update the version? because this could possibly be breaking otherwise.
|
merged icons, pls fix conflicts |
|
@EthanSK conflicts fixed |
|
@iRoachie more conflicts popped up. |
|
I tried getting icons to work, couldn't. VScode API is very buggy, so will have to wait sadly... |
|
any update? |
|
I don't think it works? Tried adding Also tried |
Addresses #10 (comment).
Note that color is not supported for split terminals (other than the first) as there's no
changeColorAPI that accepts args similar torenameWithArg