Comments (10)
Reply by @stevenguh over in #38:
For this case, it can be adjacent to original issue. But let's open another issue to track it. I think the cause of this is probably because multiple
onDidChangeValue
events are called before the pervious one has a chance to complete, and the time to finishonDidChangeValue
probably also increased by #34. Two attempts in my heads are
- Have a queue to batch the
onDidChangeValue
to handle event in sequence. However, probably won't work by itself for the upcoming 1.57 (#34) due to how we modify the input.- Change the input handling completely to eliminate modification of the input field.
indeed it gets much better when I set whichkey.delay to 1 instead of 0. Maybe that logic should be active in some way even without a delay
The difference is that
vscode-which-key/src/menu/menu.ts
Lines 239 to 245 in 9c6ad3a
is running on asynchronously when delay is 1. The might be due to us needing to have a workaround to await for set value for #34.
@The-Compiler Wondering what's the version of vscode you are running? Can you also try which-key version v0.8.4 to see if it's any better? Btw, I am also having trouble reproducing the issue on my computer
from vscode-which-key.
I'm on VS Code 1.56.2 on Archlinux:
Version: 1.56.2
Commit: 054a9295330880ed74ceaedda236253b4f39a335
Date: 2021-05-12T16:45:26.313Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Linux x64 5.12.3-arch1-1
What's the easiest way I can try the older version? I'm trying to get a development setup, but no dice so far - I'll open a separate issue for that, though chances are that's a problem on my side of some sorts.
from vscode-which-key.
Thanks for opening a well organized separate issue 😄
What's the easiest way I can try the older version? I'm trying to get a development setup, but no dice so far - I'll open a separate issue for that, though chances are that's a problem on my side of some sorts.
You can choose to Install Another Version
from the extension page of VSCode.
from vscode-which-key.
Sorry for the looong delay, I kinda lost track of this one (but it still trips me up from time to time 😅).
Indeed v0.8.4 works fine, and a git bisect tells me that 3212562 ("Fix the onDidChangeValue API change of QuickPick") introduced the issue.
If you're on Linux, the easiest way to reproduce this is sleep 2 && xdotool type ' pf'
and then focusing the VS Code window. In about 3 out of 4 cases, this will result in being in the "Project" menu, rather than the file menu.
from vscode-which-key.
Indeed v0.8.4 works fine, and a git bisect tells me that 3212562 ("Fix the onDidChangeValue API change of QuickPick") introduced the issue.
Thanks for tracking it down 😄 I suspect that would be that case since that commit introduced a lot more awaits in order get around vscode API change while keeping existing model. vscode api 🤦🏻♂️
- Have a queue to batch the
onDidChangeValue
to handle event in sequence. However, probably won't work by itself for the upcoming 1.57 (#34) due to how we modify the input.- Change the input handling completely to eliminate modification of the input field.
Those two options I mentioned are still applicable, but I'd like to push the new version out first then come back to this.
If you're on Linux, the easiest way to reproduce this is sleep 2 && xdotool type ' pf' and then focusing the VS Code window. In about 3 out of 4 cases, this will result in being in the "Project" menu, rather than the file menu.
I don't have a native linux, I probably will setup a VM for it when I get to this.
from vscode-which-key.
What OS are you on? I do have access to Windows and macOS 10.14, so I can find a similar reproducer there most likely.
from vscode-which-key.
I have access to macOS and Windows. It will speed things up if you can find a way to reproduce on one of those platforms :)
from vscode-which-key.
Hah, while trying to find a reproducer there, I just discovered that the issue actually vanished after upgrading to VS Code 1.57.0 🎉
If you were using the Insiders Build that might've been the reason why you couldn't reproduce it! If you still want to track this down, download the older VS Code and:
Windows
- Install Autohotkey
- Save this as
pf.ahk
:
^j::
Send, {Space}
Sleep, 100
Send, pf
return
- Double click it
- Press Ctrl-j in VS Code.
macOS
- Run
sleep 2 && osascript -e 'tell application "System Events" to keystroke space' -e 'tell application "System Events" to keystroke "pf"'
- Grant permissions
- Run again
- Switch to VS Code
But probably not worth the trouble, given that this is a corner case which doesn't appear with the newest VS Code version now. So if you prefer, feel free to close! 😅
from vscode-which-key.
If it doesn't appear in the latest version, let's close this one. We can reopen it if it appears again and spend some time attempting to fix it on our side.
from vscode-which-key.
Agreed, thanks!
from vscode-which-key.
Related Issues (20)
- Support for VSCode Web HOT 3
- Navigate up / back in the menu structure HOT 2
- Show key bindings in menus HOT 3
- Support partial override HOT 1
- triggerKey Not Firing from edamagit HOT 7
- Weird behaviour with Github Pull Request extension HOT 1
- `whichkey.delay` causes a delay in `SPC SPC` shortcut, others seem to be unaffected HOT 6
- Add default binding for `git pull`
- Crash when mixing `key` / `keys` and using `whichkey.sortOrder` HOT 2
- [bug/ feature?]: whichkey.searchBindings should support fuzzy search HOT 2
- [Help Wanted] Show the menu when press g HOT 3
- Debug Transient State gets closed. HOT 4
- Support several menus HOT 4
- Space keybind with vscode-neovim and the Commands option HOT 5
- `bindings` vs `bindingOverrides` and `keys` vs `key` HOT 3
- Ability to specify font for menu "keys" HOT 6
- Typos in commands
- Reliable key sequence handling HOT 2
- Is there a way to have bindings without a doc, and vice versa? HOT 1
- Support initial menu delay HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-which-key.