From 8ade3e7ee26c1dedd105a20fa769c68e4103b75d Mon Sep 17 00:00:00 2001
From: Keith Lyons <lyonk71@gmail.com>
Date: Thu, 17 Jul 2025 20:45:42 -0400
Subject: feat(ui): hide cursor when terminal is unfocused (#4012)

---
 packages/cli/src/ui/components/InputPrompt.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/cli/src/ui/components/InputPrompt.tsx')

diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx
index 7cefdc08..01ed8db1 100644
--- a/packages/cli/src/ui/components/InputPrompt.tsx
+++ b/packages/cli/src/ui/components/InputPrompt.tsx
@@ -453,7 +453,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
                 display = display + ' '.repeat(inputWidth - currentVisualWidth);
               }
 
-              if (visualIdxInRenderedSet === cursorVisualRow) {
+              if (focus && visualIdxInRenderedSet === cursorVisualRow) {
                 const relativeVisualColForHighlight = cursorVisualColAbsolute;
 
                 if (relativeVisualColForHighlight >= 0) {
-- 
cgit v1.2.3

