Vscode-cpptools: Light bulb (code action) appears on most lines with VS Code 1.9

Created on 2 Feb 2017  路  15Comments  路  Source: microsoft/vscode-cpptools

We're working on releasing a fix for this ASAP. In the future, we should probably do more testing with the insider's release so we're not caught off guard by changes like this.

Language Service bug

Most helpful comment

The bug has been fixed in our pending 0.10.1 release.

All 15 comments

The bug has been fixed in our pending 0.10.1 release.

I'm experiencing odd behaviour switching between to C files. Could this be attributed to the lightbulb issue?

  • Sometimes switching between files lock up by "Add include path to settings" popping up for no reason. In some cases the file is rendered but jumps to the top when attempting to scroll. Other times it's selected but won't show until you start scrolling.
  • Also experienced the tabs not reflecting which file is currently selected. Clicking them back and forth can be out of sync.

Those issues sound completely different and like VS Code bugs. Our extension doesn't control any of the rendering/UI details -- the lightbulb appears just by sending them a diagnostics message. I have not experienced the behavior you have described so far.

It immediately disappears when I disable the Cpp extension. All other extensions still enabled. I'm on latest insiders release.

Here I recorded when I:

  1. Try switching between tabs. As you can see, the file is selected and the canvas is refreshed, but the tab isn't until I click it once again.
  2. I then try scrolling down one of the files and select a line, switch to the other tab and then when I switch back to the first tab it initially looks good. But as soon as I start scrolling it jumps to the top.

odd_behavior

This is also the case when using e.g Go to definition. Document is rendered correctly, but when I start scrolling it always jumps to the top.

In VS Code we have changed the strategy how we automatically ask for code actions. Before we would do that only when the cursored moved into a diagnostics range which effectively limited this to 'code fixes'. Now, we also ask for code actions when moving from word to word to support that non-fixe-code-actions, like refactorings, can be advertised via the light bulb.

@jrieken That's neat. But the could the behavior in my GIF be explained by this? Not switching tabs properly, jumping to top when scrolling and opening the Add include paths to settings for seemingly no reason?

We have a fix for the lightbulb everywhere releasing today, so maybe that will fix this other issue? I'm still not reproing what you're seeing, but I'm on 1.9.1 still. I'll try the insider's release...

https://github.com/Microsoft/vscode-cpptools/issues/472#issuecomment-278661539 - funky. the context menu with the fixes should only shows when the light bulb is clicked or when the editor.action.quickFix command is explicitly invoked. By default that is bound to Cmd+. do you have customisations in that area?

I'm reproing the bug now (with scrolling, auto-appearing quick fix). It only repros with the Insider Release and not 1.9.1. No customisations. I'll see if it repros after our pending update...

@sean-mcmanus Excellent. Then it's not me going mad :)
@jrieken Ctrl+Tab only. No custom keyboard shortcuts. On Win 10 with swedish keyboard layout if that matters.

I've verified that it's fixed with our pending 0.10.1 update. We're planning to release it today. Well, it's fixed for the C++ scenario...there might be other quickFix providers that have problems.

there might be other quickFix providers that have problems.

I hope not 馃檲 I theory with Cmd+. users could have always requested code actions at any position. My guess is that extensions have different filtering in place - based on the diagnostics, word, or offset..

Omnisharp apparently has the same issues.

@sean-mcmanus Confirmed fix to work in 0.10.1 ! :tada: :clap: 馃憤

Was this page helpful?
0 / 5 - 0 ratings