fix(tui): always position cursor for IME

# Conflicts:
#	packages/coding-agent/CHANGELOG.md
This commit is contained in:
Mario Zechner 2026-01-17 11:38:46 +01:00
parent cd43b8a9ca
commit 673916f63c
7 changed files with 87 additions and 11 deletions

View file

@ -71,6 +71,7 @@ export interface Settings {
doubleEscapeAction?: "fork" | "tree"; // Action for double-escape with empty editor (default: "tree")
thinkingBudgets?: ThinkingBudgetsSettings; // Custom token budgets for thinking levels
editorPaddingX?: number; // Horizontal padding for input editor (default: 0)
showHardwareCursor?: boolean; // Show terminal cursor while still positioning it for IME
}
/** Deep merge settings: project/overrides take precedence, nested objects merge recursively */
@ -482,6 +483,15 @@ export class SettingsManager {
this.save();
}
getShowHardwareCursor(): boolean {
return this.settings.showHardwareCursor ?? process.env.PI_HARDWARE_CURSOR === "1";
}
setShowHardwareCursor(enabled: boolean): void {
this.globalSettings.showHardwareCursor = enabled;
this.save();
}
getEditorPaddingX(): number {
return this.settings.editorPaddingX ?? 0;
}