Skip to content

fix: do not replace text when tab with empty candidates#112

Merged
ynqa merged 2 commits intov0.7.1/devfrom
tab
Apr 1, 2026
Merged

fix: do not replace text when tab with empty candidates#112
ynqa merged 2 commits intov0.7.1/devfrom
tab

Conversation

@ynqa
Copy link
Copy Markdown
Owner

@ynqa ynqa commented Apr 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 10:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR prevents the query editor text from being replaced/cleared when the completion list has no candidates (notably when Tab is used for “down” navigation), and improves the “no suggestions” flow by returning focus to the query editor.

Changes:

  • Short-circuit completion navigation events when the listbox is empty to avoid selecting/replacing with an invalid item.
  • When entering completion yields zero matches, show the “no suggestion found” guide message, switch focus back to the query editor, and clear the completion session state.
  • Simplify the toml dependency version spec in Cargo.toml.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/completion.rs Avoids selection/replacement from an empty completion list; restores editor focus and clears completion state when no suggestions exist.
Cargo.toml Updates the toml dependency version requirement string.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ynqa ynqa merged commit 647a748 into v0.7.1/dev Apr 1, 2026
11 checks passed
@ynqa ynqa deleted the tab branch April 1, 2026 12:31
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.

2 participants