Skip to content

Cmd-Click does "Go to Definition" __and__ "Peek Definition" #2084

@toh-ableton

Description

@toh-ableton

Issue Type: Bug

  1. Open a .cpp file.
  2. Hover a symbol, e.g. a function call.
  3. Cmd-Click on the symbol.

Expected results:
VS Code does exactly one of "Go to Definition" or "Peek Definition". There is a preference where I can control which one.

Actual results:
VS Code does both: it jumps to the definition, and then opens a code lens with the same definition.

Note:
I'd prefer Cmd-Click to "Peek Definition", which it used to do a while ago.

Workaround:
For Peek Definition, Alt-F12 works fine.
For Go to Definition, F12 sometimes works fine, but sometimes has the same bug, i.e. it jumps to definition and opens a code lens with the same piece of code.

Extension version: 0.17.4
VS Code version: Code 1.23.1 (d0182c3417d225529c6d5ad24b7572815d0de9ac, 2018-05-10T16:03:31.083Z)
OS version: Darwin x64 17.5.0

System Info
Item Value
CPUs Intel(R) Xeon(R) W-2191B CPU @ 2.30GHz (36 x 2300)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
vpx_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 32.00GB (0.31GB free)
Process Argv /Applications/Visual Studio Code.app/Contents/MacOS/Electron
Screen Reader no
VM 0%

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions