vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

ctrl+s not working in CMake Cache Editor (UI)

Open bebuch opened this issue 1 year ago • 1 comments

Brief Issue Summary

The shortcut Ctrl+S (or whatever binding is set) does not work in the UI CMake Cache Editor.

Reproduce:

  1. Open a CMake project
  2. Press F1
  3. CMake: Configure
  4. CMake: Edit Cmake Cache UI
  5. Change anything
  6. Press Ctrl+S or Menu -> File -> Save

Nothing happens. I was expecting the document to be saved.

Only the Save button at the top of the document works.

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.92.2",
  "cmtVersion": "1.18.44",
  "configurations": [
    {
      "folder": "c:\\TechnoTeam\\develop\\src\\TT_CodeBase",
      "cmakeVersion": "3.29.3",
      "configured": true,
      "generator": "Ninja Multi-Config",
      "usesPresets": true,
      "compilers": {
        "C": "C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe",
        "CXX": "C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug",
      "Release"
    ],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 94,
    "executablesCount": 5,
    "librariesCount": 21,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": false
    }
  ]
}

Debug Log

No response

Additional Information

Version: 1.92.2 (user setup) Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9 Date: 2024-08-14T17:29:30.058Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.22631

bebuch avatar Aug 21 '24 10:08 bebuch

@gcampbell-msft @bebuch This issue can reproduced on latest version v0.19.44, you can get the details below. Thank you!

ENV

  1. VSCode version:
  2. CMake tools version:
  3. C/C++ version:

Repro steps:

  1. Open a folder
  2. Click F1 to run command "CMake: Configure"
  3. Click F1 to run command "CMake: Edit Cmake Cache UI"
  4. Change "CMAKE_BUILD_TYPE" to Release/Debug
  5. Click Ctrl+S or click File> Save

Expected result: On the output window it shows that the configuration was successful and in the bottom right corner of the page appears the “CMake options have been saved.” image

Actual result: No response from within VScode. 4000

Yingzi1234 avatar Aug 22 '24 10:08 Yingzi1234

This has been waiting for prioritisation for three months now. Can someone please have a look?

The bug is extremely annoying and is probably easy to fix.

bebuch avatar Dec 16 '24 11:12 bebuch

@bebuch Thanks for your update and your ping on this issue.

I took a quick look and unfortunately the fix is not as simple as it might seem. vscode doesn't offer a blanket event that we could react to for a generic ctrl-s or menu save. Instead, we would have to refactor the code to implement a vscode.CustomTextEditorProvider.

Please upvote the issue as we often use the number of upvotes as a metric to help us prioritize. Thanks!

gcampbell-msft avatar Dec 16 '24 15:12 gcampbell-msft

There are currently three other upvotes. How much are required?

bebuch avatar Feb 19 '25 14:02 bebuch

@bebuch Thanks for the update, we're still investigating the issue and we'll let you know as soon as there's any developments

Yingzi1234 avatar Feb 20 '25 01:02 Yingzi1234

Any plan's to fix this? As the person responsible for our workflows, I keep getting this bug report from our developers. Without exception, everyone who switches from other IDEs runs into this and then wants to go straight back to Qt Creator, CLion, Visual Studio...

The bug makes it difficult for us to convince people that using VS Code consistently is the best solution for everyone. Especially because I can't explain why something supposedly “as simple” as Ctrl+S doesn't work.

bebuch avatar Nov 03 '25 11:11 bebuch

I agree - it would be nice to have this fixed.

PallarzMarcel avatar Nov 03 '25 11:11 PallarzMarcel

Thanks for the feedback. If there is progress on this issue, we will update here. Thanks for help us build a better CMake Tools!

yanghhhhhhh avatar Nov 06 '25 09:11 yanghhhhhhh