Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command palette column spacing doesn't shrink #12415

Open
mecjb opened this issue Jan 5, 2025 · 2 comments
Open

Command palette column spacing doesn't shrink #12415

mecjb opened this issue Jan 5, 2025 · 2 comments
Labels
C-enhancement Category: Improvements

Comments

@mecjb
Copy link

mecjb commented Jan 5, 2025

Summary

The column spacing for bindings in the command palette adjusts to the width of the widest visible bindings set, but never shrinks. This makes some doc strings unreadable, especially when they overflow and end up right aligned (see asciinema). I use the command palette regularly for binding reminders and command discoverability.

Reproduction Steps

In the square terminal the bindings start too wide, making the doc strings too short to be readable, and right aligned. In the wide terminal the columns dynamically resize up, but never shrink back down when long bindings are no longer visible.

square terminal
square

wide terminal
wide

Helix log

No response

Platform

macOS

Terminal Emulator

kitty 0.34.1

Installation Method

brew

Helix Version

helix 25.1 (dabfb6c)

@mecjb mecjb added the C-bug Category: This is a bug label Jan 5, 2025
@mecjb
Copy link
Author

mecjb commented Jan 5, 2025

Of course after I post the issue I stumble across it being mentioned before #9647 (comment). The thread mentions width handling is naive and could be improved later, but I don't see any followups about it.

@the-mikedavis the-mikedavis added C-enhancement Category: Improvements and removed C-bug Category: This is a bug labels Jan 5, 2025
@parkero
Copy link

parkero commented Jan 9, 2025

I am willing attempt a fix for this if given a starting direction

This is a fairly big hit to discoverability; when first starting with helix <space>? was easily my most used command.

The doc column can now completely disappear off screen, if at any time in the filtering keystrokes you happen to have had a command:

  • with a long name (name now set to widest)
  • multiple keybinds (bindings now set widest)

These compound additively and lead to pushing the doc column of screen, even when filtering on it specifically. This seems like unintended behavior.

Backspacing does not correct the issue -- the column does not, and will never, reappear until escaping out. Because updates are done per keystroke, it also (interestingly) creates a deterministic subset of strings that will always break doc column functionality.

This should probably be considered a bug, imo.

Example screenshot -- `%d merge` -- (click to expand) Screenshot 2025-01-08 at 11 54 51 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants