0

I have a page open writing some code and then out of nowhere after some random time my page reformats and my spaces get turned into tabs. I have to close the file and re-open in order for it to get fixed. Please have a look at the screenshot below.

I am using c# and Visual Studio 2019. I Recently updated to the latest version of visual studio and this is when this started happening. I am now on version 16.11.4. I also installed .NET 5 at the same time so not sure if something there could be messing with visual studio.

enter image description here

Edit: I Think I figured out why the spaces are added. If you look at this new screenshot you will see that it injected the gray lettering where spaces were. I tried clicking around in the empty spaces few times and those gray letters showed up. I Guess the page is having trouble loading all these in until I click on them?

Anyone has any idea why?

enter image description here

3
  • Does it still happen in VS 2022? Commented Oct 10, 2021 at 17:20
  • @CaiusJard I don't have VS 2022 Commented Oct 10, 2021 at 17:22
  • In VS menu, click: Help => Send Feedback => Report a Problem... The following may also be helpful: synergex.com/blog/2020/01/24/visual-studio-adaptive-formatting Commented Oct 10, 2021 at 17:23

2 Answers 2

3

I had the same problem when I had Resharper installed, and I upgraded to the latest version of Visual Studio.

Are you using Resharper? If yes, disable it or downgrade Visual Studio to a version compatible with your version of Resharper.

Sign up to request clarification or add additional context in comments.

1 Comment

Updating Resharper solved the issue
0

I believe this is caused by your word wrapping preferences and then resizing your window. Go to File - Preferences - Settings and then search for "wrap" and play around with the settings or turn it off.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.