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

Don't override prefix if already given #340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oliversturm
Copy link

Keys might be ['enter'], but I want the prefix to say Enter.

Keys might be `['enter']`, but I want the prefix to say `Enter`.
Copy link

@GottZ GottZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so just to be on the same page as you.. it checks if the item is an object, a function or a string and in each case assigns a prefix automagically.
now your condition checks if the prefix is null. how would it be possible to evaluate to true? an array is also an object and except number not much comes to mind that could run into that expression.

i'm not too familiar with this project yet but i think your change would be a breaking change in case you use an object as item and expect it to take .keys[0] as prefix automagically.

@ulcuber
Copy link

ulcuber commented May 19, 2022

@oliversturm I have added disableKeysPrefix option to listbar there: https://github.com/ulcuber/blessed
It should help and is not a breaking change as it is optional

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.

None yet

3 participants