Skip to content

fix: do not block Enter when the completion popup is empty - #7301

Merged
pajlada merged 5 commits into
Chatterino:masterfrom
3r01:fix-empty-completion-menu
Oct 24, 2026
Merged

pajlada merged 5 commits into
Chatterino:masterfrom
3r01:fix-empty-completion-menu

Conversation

@3r01

@3r01 3r01 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

The : and @ completion popup remains open when there are no results. In that state, it consumes Enter but does nothing.

This was discussed in #1872, but the issue was closed after fixing only a problem with : inside links.

Fixed by only having the completion popup consume Enter when there is a completion to accept. If the popup is empty, Enter falls through to the normal input actions. That usually means sending the message, but can vary depending on the user's hotkeys.

Added tests.

…ion-menu

# Conflicts:
#	src/widgets/splits/InputCompletionPopup.cpp
#	tests/src/InputCompletion.cpp
#	tests/src/SplitInput.cpp
Comment on lines +173 to +174
if ((keyEvent->key() == Qt::Key_Enter ||
keyEvent->key() == Qt::Key_Return) &&

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A user can change the key binding for "send message", in which case the issue would not be fixed.

I haven't found a good way to figure out that a shortcut of a specific type was triggered, so I'm not sure if it's feasible to solve this

@3r01 3r01 Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This check is just for accepting a completion, the change in SplitInput already lets custom send hotkeys through when the completion list is empty

I added a test covering this case to be sure

@pajlada
pajlada enabled auto-merge (squash) October 24, 2026 14:11
@pajlada
pajlada merged commit ec70d88 into Chatterino:master Oct 24, 2026
18 checks passed
@3r01
3r01 deleted the fix-empty-completion-menu branch October 24, 2026 14:40
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