Skip to content

fix(mason_logger): redraw chooseOne/chooseAny with relative cursor moves - #1680

Open
spydon wants to merge 1 commit into
felangel:masterfrom
spydon:fix/choose-relative-cursor-redraw
Open

fix(mason_logger): redraw chooseOne/chooseAny with relative cursor moves#1680
spydon wants to merge 1 commit into
felangel:masterfrom
spydon:fix/choose-relative-cursor-redraw

Conversation

@spydon

@spydon spydon commented Jul 20, 2026

Copy link
Copy Markdown

Status

READY

Description

Screen.Recording.2026-07-20.at.16.03.37.mov

chooseOne/chooseAny redraw the list by saving and restoring the cursor with the DEC sequences \x1b7/\x1b8. Some terminals ignore those, so the restore is a no-op and the whole prompt gets reprinted below itself on every keypress instead of updating in place.

Switched the redraw to relative cursor moves (\x1b[<n>A + \r + \x1b[J), which are much more widely supported.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@spydon
spydon requested a review from felangel as a code owner July 20, 2026 13:40
@spydon
spydon force-pushed the fix/choose-relative-cursor-redraw branch from b86b31c to 3770c1e Compare July 20, 2026 14:08
@spydon

spydon commented Jul 20, 2026

Copy link
Copy Markdown
Author

This should be superseding #1672, since this fixes it for all cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant