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

Long options break multisearch options #113

Closed
joachim-n opened this issue Feb 19, 2024 · 3 comments · Fixed by #114
Closed

Long options break multisearch options #113

joachim-n opened this issue Feb 19, 2024 · 3 comments · Fixed by #114
Assignees

Comments

@joachim-n
Copy link

joachim-n commented Feb 19, 2024

Laravel Prompts Version

0.1.15

Laravel Version

N/A

PHP Version

8.1.23

Operating System & Version

MacOS

Terminal Application

iTerm2

Description

If one of the options passed to search() is longer than the size of the displayed box, the output looks broken, and using the up and down arrows makes the whole thing go haywire.

Partial output (EDIT - that doesn't show the problem as it doesn't wrap on here!)

 ┌ Enter the Event names ───────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │                                                                                                                                  │
 ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
 │   ◻ -- None --                                                                                                               ┃   │
 │   ◻ \Drupal\block_content\BlockContentEvents::BLOCK_CONTENT_GET_DEPENDENCY - \Drupal\block_content\BlockContentEvents::BLOCK_… │ │
 │   ◻ \Drupal\user\Event\UserEvents::FLOOD_BLOCKED_USER - \Drupal\user\Event\UserEvents::FLOOD_BLOCKED_USER                    │   │
 │   ◻ \Drupal\user\Event\UserEvents::FLOOD_BLOCKED_IP - \Drupal\user\Event\UserEvents::FLOOD_BLOCKED_IP                        │   │

Steps To Reproduce

Supply an option which is longer than the width of the terminal.

@jessarcher
Copy link
Member

Hey @joachim-n,

I assume you mean the multisearch prompt? I'll take a look at that one, but couldn't replicate it with search.

@jessarcher jessarcher changed the title Long options break search options Long options break multisearch options Feb 21, 2024
@jessarcher
Copy link
Member

The multisearch prompt should be fixed in #114. Let us know if you were actually experiencing the issue with the search prompt.

@joachim-n
Copy link
Author

Yes, it was multisearch -- sorry for the mistake.
I've just tested with search() and it truncates long options with an ellipsis.
Thanks for the quick fix!

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

Successfully merging a pull request may close this issue.

3 participants