about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-08 10:00:37 +0000
committerbors <bors@rust-lang.org>2023-12-08 10:00:37 +0000
commitc27fc0c945e467177e0b01d25c510d559bdce4f4 (patch)
tree9ba7854758d1e1170bb7c53217bcff3e3bd165a3 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentbc9c952b6d02bf889fff84ba508423b1daca381e (diff)
parentec3f35bf63c80bc37952b4f1385b81bccea71900 (diff)
downloadrust-c27fc0c945e467177e0b01d25c510d559bdce4f4.tar.gz
rust-c27fc0c945e467177e0b01d25c510d559bdce4f4.zip
Auto merge of #15896 - minestarks:run-quickpick, r=Veykril
Show placeholder while run command gets runnables from server

This PR fixes a UI annoyance in the VS Code extension when working in large codebases where rust-analyzer can take a few moments to interact with the server. Scenario:

1. Invoke "rust-analyzer: Run" from the command palette or hotkey
2. Quickly start typing to filter the list (or press Enter to accept the last runnable)

We often do this quickly from muscle memory without waiting to see the picker. The picker often takes several seconds to come up, causing us to type garbage into the currently open editor.

Fix:

Show a placeholder item before we call out to the server.

![image](https://github.com/rust-lang/rust-analyzer/assets/16928427/09de6a1c-6f3c-4d29-8031-ba4baeb43282)

Selecting this item does nothing so if the user accidentally hits Enter nothing happens.

The list is populated and the placeholder dismissed when the actual runnables are retrieved. From here the behavior is the same as before.

![image](https://github.com/rust-lang/rust-analyzer/assets/16928427/837c7dfc-c060-4d68-bbf6-df8aa3101b78)
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions