mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 05:00:16 +00:00
Add PI_NO_HARDWARE_CURSOR env var for terminals with limited escape sequence support
Fixes cursor visibility issues in JetBrains IDE terminals (IntelliJ, PyCharm) where the hardware cursor either blinks or becomes invisible depending on settings. Fixes #771
This commit is contained in:
parent
3a475fe165
commit
4dbf094b65
3 changed files with 12 additions and 0 deletions
|
|
@ -981,6 +981,12 @@ export class TUI extends Container {
|
|||
* @param totalLines Total number of rendered lines
|
||||
*/
|
||||
private positionHardwareCursor(cursorPos: { row: number; col: number } | null, totalLines: number): void {
|
||||
// PI_NO_HARDWARE_CURSOR=1 disables hardware cursor for terminals that don't handle it well
|
||||
if (process.env.PI_NO_HARDWARE_CURSOR === "1") {
|
||||
this.terminal.hideCursor();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cursorPos || totalLines <= 0) {
|
||||
this.terminal.hideCursor();
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue