fix: readline detection for pwsh (#177)

Signed-off-by: Chapman Pendery <cpendery@vt.edu>
This commit is contained in:
Chapman Pendery
2024-03-01 11:28:24 -08:00
committed by GitHub
parent d59e3dfe21
commit 8fc1d03a5f
+5 -2
View File
@@ -151,11 +151,14 @@ export class CommandManager {
private _isSuggestion(cell: IBufferCell | undefined): boolean {
const color = cell?.getFgColor();
const dullColor = color == 8 || (color ?? 0) > 235;
const dim = (cell?.isDim() ?? 0) > 0;
const italic = (cell?.isItalic() ?? 0) > 0;
const dullColor = color == 8 || color == 7 || (color ?? 0) > 235 || (color == 15 && dim);
const dullItalic = (color ?? 0) > 235 || (dullColor && italic);
if (this.#shell == Shell.Powershell) {
return false;
} else if (this.#shell == Shell.Pwsh) {
return (color ?? 0) > 235;
return dullItalic;
}
return dullColor;
}