Skip to content

Conversation

uri
Copy link
Contributor

@uri uri commented Aug 15, 2025

Describe your changes

This change checks for the presence of a dialog before checking for other handlers.

Now when pressing ctrl+p when a dialog is visible it will correctly navigate up the list. This restores the standard terminal behavior of using ctrl+n and ctrl+p.

How to reproduce:

  1. ctrl+p to open for the command launcher
  2. ctrl+n (or down) to move down one item
  3. ctrl+p - command dialog closed

With this fix, step 3. will now correctly select the previous item in the dialog.

Checklist before requesting a review

@uri uri requested a review from a team as a code owner August 15, 2025 00:56
@uri uri requested review from meowgorithm and aymanbagabas and removed request for a team August 15, 2025 00:56
@charmcli
Copy link
Contributor

charmcli commented Aug 15, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@uri
Copy link
Contributor Author

uri commented Aug 15, 2025

I have read the Contributor License Agreement (CLA) and hereby sign the CLA.

This change checks for the presence of a dialog before checking for
other handlers.

Now when pressing ctrl+p when a dialog is visible it will correctly
navigate up the list. This restores the standard terminal behavior of
using ctrl+n and ctrl+p.

How to reproduce:

1. ctrl+p to open for the command launcher
2. ctrl+n (or down) to move down one item
3. ctrl+p - command dialog closed

With this fix, step 3. will now correctly select the previous item in
the dialog.
Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

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

Thank you for contributing @uri!

I tested and this is working great.

The push I made to your branch was just to fix a conflict that appeared since you opened the PR.

@andreynering andreynering merged commit 63e53f1 into charmbracelet:main Aug 15, 2025
10 checks passed
scalabl3 pushed a commit to metaphori-ai/crush that referenced this pull request Aug 19, 2025
)

This change checks for the presence of a dialog before checking for
other handlers.

Now when pressing ctrl+p when a dialog is visible it will correctly
navigate up the list. This restores the standard terminal behavior of
using ctrl+n and ctrl+p.

How to reproduce:

1. ctrl+p to open for the command launcher
2. ctrl+n (or down) to move down one item
3. ctrl+p - command dialog closed

With this fix, step 3. will now correctly select the previous item in
the dialog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants