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

Shortcut ignores word scheme settings #423

Closed
pdulich opened this issue Dec 8, 2021 · 2 comments
Closed

Shortcut ignores word scheme settings #423

pdulich opened this issue Dec 8, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pdulich
Copy link

pdulich commented Dec 8, 2021

Description
Randomness ignores the "Quick Switch Word Scheme" settings, when using a shortcut to generate a word.

Steps to reproduce
Assumption: You have multiple schemes (with different words/dicts) defined in "Preferences > Tools > Randomness > Words"

Register a shortcut for "Random Word"

  1. Go to 'Preferences > KeyMap'
  2. Assign a shortcut to 'Plugins > Randomness > Random Word' (e.g. Option + W)
  3. Close the dialog with 'OK'

Using the shortcut

  1. Open any file where you can generate a word (e.g. plain text)
  2. Change the scheme by using "Quick Switch Word Scheme" (Option + R > Random Word > Quick Switch Word Scheme)
  3. Use the shortcut again
  4. Notice, that the newly generated word is taken from the old and not the scheme, to which you switched before
  5. Use the "Random Word" action from the "Quick View" (Option + R > Random Word)
  6. Notice, that the correct scheme is used

Expected behavior
The "Random Word" action should behave the same way as when using the "Quick View".

Version information

  • Randomness version: 2.7.3
  • IDE version: IntelliJ Ultimate 2021.3
  • Operating system: macOS 12.0.1
  • Java version 15.0.5
@pdulich pdulich added the bug Something isn't working label Dec 8, 2021
@FWDekker
Copy link
Owner

FWDekker commented Dec 8, 2021

Hi Pascal! Thanks for reporting this bug, it's much appreciated. I've been able to reproduce the bug on my end, and it looks like the shortcut action just looks at the initial settings at the moment they are first read in the IDE session. I have a suspicion as to what may cause this, but will have to look into it a bit more. I'll keep you up to date :-)

FWDekker added a commit that referenced this issue Dec 10, 2021
@FWDekker
Copy link
Owner

The issue has been fixed and will be available in v2.7.4. The update should be available in your IDE in a few days, but if you cannot wait until then you can always download intellij-randomness-2.7.4.zip from the latest release and install the plugin from disk.

Thank you again for the report!

Note to self: The fix is quite ugly, but that will only incentivise me to start working on v3 again so I can think of something better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants