microsoft / vscode

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

Wrong starting column when toggling comments for makefile commands #234464

Open mcandre opened 4 days ago

mcandre commented 4 days ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

  1. Write a makefile with a default task like all: and a command like echo hello.
  2. Use VSCode hotkeys to toggle comments on and off for the command.

Expected:

Code comments for make commands begin at the very first column.

Observed:

Code comments try to indent the comment. This disrupts the visual flow of makefiles, and the syntax risks interacting poorly with parsers for various make implementations and shells.

vs-code-engineering[bot] commented 4 days ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.95.3. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

RedCMD commented 4 days ago
all:
    echo hello

pressing ctrl+/ on line 2 results in the comment being placed after the tab rather than at the start of the line Image

mcandre commented 3 days ago

Yeah, this is a longstanding bug that's been happening for years.