Skip to content

Fix: query icon flashes when using shortcut translation#1095

Merged
tisfeng merged 4 commits intotisfeng:devfrom
Lxnii:fix/selection-query-icon-flash
Feb 6, 2026
Merged

Fix: query icon flashes when using shortcut translation#1095
tisfeng merged 4 commits intotisfeng:devfrom
Lxnii:fix/selection-query-icon-flash

Conversation

@Lxnii
Copy link
Copy Markdown
Contributor

@Lxnii Lxnii commented Feb 4, 2026

The query icon flashes briefly when triggering a translation via shortcut, even when the "Auto show query icon after selecting text" setting is turned off.

I compared the current code with the v2.16.2. I found that the Swift refactor changed the logic gate in handleSelectedText to a loose || check. This causes shortcut actions to bypass user preferences and incorrectly trigger the query icon to flash.

Changes: Restricted the query icon to auto-selection (.autoSelectQuery) only, aligning it with the logic used in v2.16.2.

Fixes #1088

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Hello Lxnii, Thank you for your first PR contribution 🎉 Lxnii

@tisfeng tisfeng self-assigned this Feb 6, 2026
@tisfeng
Copy link
Copy Markdown
Owner

tisfeng commented Feb 6, 2026

Thanks your PR, looks good

@tisfeng tisfeng merged commit 3a39842 into tisfeng:dev Feb 6, 2026
3 checks passed
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