dotnet/roslyn

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

開放

#2,487 建立於 2015年5月4日

 (54 則留言) (4 個反應) (1 位負責人)C# (4,257 個分叉)batch import
Area-IDEBugIDE-Formatterhelp wanted

倉庫指標

星標
 (20,414 顆星)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 256 個 PR)

描述

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


貢獻者指南