Skip to content

Connect: Entering a # character forces all preprocessor entries to be reindented #2487

@dotnet-bot

Description

@dotnet-bot

Ported from TFS WorkItem: 1160552


Repro Steps:

This item was filed by a customer. Please communicate and close the loop with your customer via the customer tab inside TFS.


Problem Description


Hi,

Entering a # character forces all preprocessor entries to be indented again, even when all formatting options have been disabled. It also displaces some "}"s

My setup is: automatical formatting fully disabled , tabs size=4, keep tabs, indenting=none

I'm supplying two images to ease the explanation.

  • Put your code like in image 1. Please note that there's a tabulation before "static void myfunc ()", so #if COND1 is not at the beginning of the line.
  • Put the cursor where the cursor is in the image 1
  • Type #
  • The #if COND1 is automatically indented, and the closing bracket is moved to the right (shown in image 2)

image1: https://dl.dropboxusercontent.com/u/49509038/img/vs2015_ctp6/img1.png

image2: https://dl.dropboxusercontent.com/u/49509038/img/vs2015_ctp6/img2.png


Revisions:

  1. Created By Microsoft Connect (4/21/2015 4:46:12 AM)

------------------------

Customer Information

------------------------

User ID: 10125130

Handle: KakCAT



---------------------------

Connect Site Information

---------------------------

Site Name: Visual Studio and .NET Framework

Site ID: 210

Feedback ID: 1266613

Feedback Form: 6049



----------------------

Problem Description

-----------------------

Hi,

Entering a # character forces all preprocessor entries to be indented again, even when all formatting options have been disabled. It also displaces some "}"s

My setup is: automatical formatting fully disabled , tabs size=4, keep tabs, indenting=none

I'm supplying two images to ease the explanation.

  • Put your code like in image 1. Please note that there's a tabulation before "static void myfunc ()", so #if COND1 is not at the beginning of the line.
  • Put the cursor where the cursor is in the image 1
  • Type #
  • The #if COND1 is automatically indented, and the closing bracket is moved to the right (shown in image 2)

image1: https://dl.dropboxusercontent.com/u/49509038/img/vs2015_ctp6/img1.png
image2: https://dl.dropboxusercontent.com/u/49509038/img/vs2015_ctp6/img2.png


  1. Edited By Macy Qu (Shang Hai Wei Chuang Ruan Jian) (4/21/2015 8:11:12 PM)

repro on Win8.1 with VS2015 CTP6


Metadata

Metadata

Assignees

Labels

Area-IDEBugIDE-FormatterCode formatter and/or smart indenthelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

Type

No type

Projects

Status

InQueue

Relationships

None yet

Development

No branches or pull requests

Issue actions