Skip to content

Fix cursor showing and hiding#141

Merged
JohanMabille merged 2 commits intoQuantStack:mainfrom
ianthomas23:cursor-handling
Apr 17, 2026
Merged

Fix cursor showing and hiding#141
JohanMabille merged 2 commits intoQuantStack:mainfrom
ianthomas23:cursor-handling

Conversation

@ianthomas23
Copy link
Copy Markdown
Member

The cursor showing and hiding logic that I previously implemented via the cursor_hider scope object was buggy in that it could end up leaving the cursor hidden at the end of a git2cpp command. This would happen, for example, using a prompt_input which ensures that the cursor is enabled when the prompt is shown and then hides it at the end. The solution, in the presence of potentially nested cursor_hider objects, is to keep a static count of the number of active scope objects and ensure the cursor is shown when this goes down to zero.

It does introduce a static variable which isn't ideal but it is only a single unsigned int.

This is very hard to test, so I am not doing so in CI but I have tested it manually in both macos and wasm builds.

@ianthomas23 ianthomas23 added the bug Something isn't working label Apr 17, 2026
@ianthomas23 ianthomas23 marked this pull request as ready for review April 17, 2026 14:30
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.23%. Comparing base (ad032f0) to head (26347d1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/utils/input_output.cpp 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #141      +/-   ##
==========================================
- Coverage   88.27%   87.23%   -1.04%     
==========================================
  Files          61       61              
  Lines        2627     2633       +6     
  Branches      309      310       +1     
==========================================
- Hits         2319     2297      -22     
- Misses        308      336      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JohanMabille JohanMabille merged commit d4e011b into QuantStack:main Apr 17, 2026
7 of 10 checks passed
@ianthomas23
Copy link
Copy Markdown
Member Author

Fixes #129.

@ianthomas23 ianthomas23 deleted the cursor-handling branch April 17, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants