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


贡献者指南