Skip to content

In a git-rebase-todo file, parsing for comment syntax is incomplete. Not all comments have correct syntax highlighting. #156955

@devinrhode2

Description

@devinrhode2

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

Version: 1.69.2
Commit: 3b889b090b5ad5793f524b5d1d39fda662b96a2a
Date: 2022-07-18T16:32:39.000Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin arm64 21.6.0

Inside git-rebase-todo files, there is no syntax highlighting for # comments

CleanShot 2022-08-02 at 22 17 43

Steps to Reproduce:

  1. Ensure clean git status
  2. Create an empty commit git commit -m "asdf" --allow-empty
  3. Start interactive rebase git rebase -i HEAD~1
  4. Note the line with pick 809y2e3 asdf ends with # empty. This is a code comment in this file.
  5. Add a line to the git-rebase-todo file:
  6. exec echo 'asdf' # comment
  7. Close file, to begin rebasing.
  8. Observe that the echo 'asdf' prints a plain asdf and the # comment does not interfere at all.

If you scroll to the bottom of a git-rebase-todo file, you'll see a large block of comments created by git, a guide for doing the interactive rebase. Note that these comments are green (I'm using vscode's default dark theme)

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buggitGIT issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions