Skip to content

Commit 9f1d5c1

Browse files
committed
fix: disable blinking cursor if ghostty term
1 parent a6b76f3 commit 9f1d5c1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/BlinkCaret.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ export const BlinkCaret: React.FC<BlinkCaretProps> = ({
1919
useEffect(() => {
2020
if (!enabled) return
2121

22+
const isGhostty = process.env.TERM_PROGRAM === "ghostty"
23+
24+
if (isGhostty) {
25+
// Disable blinking in Ghostty to avoid scroll position reset bug
26+
setVisible(enabled)
27+
return
28+
}
29+
2230
const refreshInterval = setInterval(() => {
2331
setVisible((v) => !v)
2432
}, interval)

0 commit comments

Comments
 (0)