AnWeber / vscode-statusbar-command

MIT License
16 stars 4 forks source link

editor.action.commentLine no longer working in VSCode v1.5.1 #4

Closed jgolieb closed 8 years ago

jgolieb commented 8 years ago

The statusbar command button defined as follows has stopped working after upgrading to VSCode v.1.5.1:

"statusbar_command.commands": [
        {
            "text": "//",
            "tooltip": "Toggle Comment",
            "alignment": "left",
            "command": "editor.action.commentLine"
        }
    ]

This was working fine before (v1.4) but now I get the error "Command 'Toggle Line Comment' can not be run from here." The command editor.action.commentLine still works fine using the default key binding (ctrl + /) or from the command palette.

AnWeber commented 8 years ago

vscode 1.5.2 does not fix the issue. I think it is an issue directly in vs code. This extension uses the API createStatusbarItem. Then the statusbarItem property command is set. When clicking on the button, no code of my extension is executed. The extension only manages the creation und destruction of the buttons.

AnWeber commented 8 years ago

I created a new issue in vscode repo.

AnWeber commented 8 years ago

this issue was fixed by microsoft. In one of the next releases this feature works again. thanks.