fix: improve console experience on mac

This commit is contained in:
KernelDeimos 2024-06-24 14:01:00 -04:00
parent c79f500364
commit 15465bfc50

View File

@ -181,14 +181,25 @@ class DevConsoleService extends BaseService {
`\x1B[0m\n`
);
// Input background disabled on Mac OS because it
// has a - brace yourself - light-theme terminal 😱
const drawInputBackground =
process.platform === 'darwin';
// Redraw the static lines
this.static_lines.forEach(line => {
process.stdout.write(line + '\n');
});
if ( drawInputBackground ) {
// input background
process.stdout.write('\x1b[48;5;234m');
}
rl.resume();
rl._refreshLine();
if ( drawInputBackground ) {
// input background
process.stdout.write('\x1b[48;5;237m');
}
};
this._redraw = () => {