[PR #441] [MERGED] fix: hide terminal cursor when showCursor is false #537

Closed
opened 2026-03-02 23:46:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/441
Author: @remorses
Created: 12/24/2025
Status: Merged
Merged: 12/30/2025
Merged by: @kommander

Base: mainHead: fix-show-cursor-visibility


📝 Commits (2)

  • 13167e7 fix: hide terminal cursor when showCursor changes to false
  • 6bafc3f add tests

📊 Changes

6 files changed (+411 additions, -0 deletions)

View changed files

📝 packages/core/src/renderables/EditBufferRenderable.ts (+3 -0)
📝 packages/core/src/renderer.ts (+4 -0)
📝 packages/core/src/zig-structs.ts (+12 -0)
📝 packages/core/src/zig.ts (+36 -0)
📝 packages/core/src/zig/lib.zig (+36 -0)
packages/solid/tests/cursor-behavior.test.tsx (+320 -0)

📄 Description

When showCursor prop changes from true to false, the cursor was still visible because renderCursor just returned early without hiding the cursor.

This fix calls setCursorPosition(0, 0, false) to hide the terminal cursor when showCursor is false or the component is not focused.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/441 **Author:** [@remorses](https://github.com/remorses) **Created:** 12/24/2025 **Status:** ✅ Merged **Merged:** 12/30/2025 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `fix-show-cursor-visibility` --- ### 📝 Commits (2) - [`13167e7`](https://github.com/anomalyco/opentui/commit/13167e7da833cce5a1af0d6e8f981dadb8b6c1bf) fix: hide terminal cursor when showCursor changes to false - [`6bafc3f`](https://github.com/anomalyco/opentui/commit/6bafc3fa814b479c1718f0d8f0c35c71cbfcc7dd) add tests ### 📊 Changes **6 files changed** (+411 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderables/EditBufferRenderable.ts` (+3 -0) 📝 `packages/core/src/renderer.ts` (+4 -0) 📝 `packages/core/src/zig-structs.ts` (+12 -0) 📝 `packages/core/src/zig.ts` (+36 -0) 📝 `packages/core/src/zig/lib.zig` (+36 -0) ➕ `packages/solid/tests/cursor-behavior.test.tsx` (+320 -0) </details> ### 📄 Description When `showCursor` prop changes from `true` to `false`, the cursor was still visible because `renderCursor` just returned early without hiding the cursor. This fix calls `setCursorPosition(0, 0, false)` to hide the terminal cursor when `showCursor` is false or the component is not focused. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:46:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#537
No description provided.