microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.65k stars 28.68k forks source link

rename symbol preview not working #210828

Open pytlv opened 5 months ago

pytlv commented 5 months ago

Type: Bug

Create simple program:

text = "Hello, World!"
text = text.replace("World", "Python")
print(text)

Mark "text" and press F2 I get the following: Enter to rename, undefined to Preview So I don't have the option to preview.

Many thanks for your help!

VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:41:02.734Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 x 1800)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|23.85GB (11.86GB free)| |Process Argv|--crash-reporter-id 7fd7dfd0-5d75-4f7d-aebb-a48231238ebc| |Screen Reader|no| |VM|0%|
Extensions (21) Extension|Author (truncated)|Version ---|---|--- Bookmarks|ale|13.5.0 vscode-sqlite|ale|0.14.1 copilot-inline-toggle|Bub|0.1.0 githistory|don|0.6.20 vscode-firefox-debug|fir|2.9.10 code-runner|for|0.12.2 outline-map|Ger|1.4.0 copilot|Git|1.180.0 copilot-chat|Git|0.14.1 wrapSelection|kon|0.10.0 rainbow-csv|mec|3.11.0 black-formatter|ms-|2024.2.0 debugpy|ms-|2024.5.11001012 python|ms-|2024.4.1 vscode-pylance|ms-|2024.4.1 jupyter|ms-|2024.3.1 jupyter-keymap|ms-|1.1.2 vscode-jupyter-cell-tags|ms-|0.1.9 back-n-forth|nic|3.1.1 LiveServer|rit|5.7.9 markdown-preview-enhanced|shd|0.8.13
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscoreces:30445986 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 ccp1r6:30993540 dsvsc020:30976470 pythonait:31006305 gee8j676:31009558 dsvsc021:30996838 945dj816:31013170 pythoncenvpt:31022790 ```
pytlv commented 5 months ago

Managed to solve it on my own. If you have a created a custom keyboard shortcut for ctrl+enter it will cause it. How to reproduce: keybindings.json

  {
        "key": "ctrl+enter",
        "command": "code-runner.run"
  },

Solution delete or comment the entry

jrieken commented 5 months ago

Let's keep this open. When configuring some other keybinding the UI shouldn't show undefined

jrieken commented 5 months ago

@ulugbekna feel free to take this