mirror of
https://github.com/wavetermdev/inshellisense.git
synced 2026-08-05 13:43:30 -07:00
fix: readline detection for pwsh (#177)
Signed-off-by: Chapman Pendery <cpendery@vt.edu>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user