Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format Code not modifying the first line selected (unless it is selected all the way to the left) #214

Closed
jeffschwMSFT opened this issue Apr 18, 2016 · 4 comments

Comments

@jeffschwMSFT
Copy link
Member

format

Here is the sample code (though it is trivial):
using System;
using System.Collections.Generic;

namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Dictionary<string, string> context = new Dictionary<string, string>() {
{"a", "some string"}};

                    int foo = 1;
                     bool b = false;

                        Console.WriteLine("{0} {1} {2}", context["a"], foo, b);
    }
}

}

If you select anywhere between the "n" in "int" to "e" in "Console" and then request VS Code to format the code, it will do the last 2 lines, but not the first.

C# Extension 1.0.3-rc2
Mac OS X

@DustinCampbell
Copy link
Member

Good bug -- thanks!

@rchande
Copy link

rchande commented Nov 30, 2017

@akshita31 Can you take a look?

@akshita31
Copy link
Contributor

The issue has been resolved with the change : OmniSharp/omnisharp-roslyn#1043 .

@akshita31
Copy link
Contributor

akshita31 commented Feb 7, 2018

This issue has been fixed in the 1.14 milestone. We just released a beta of 1.14 - https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.14.0-beta4. Follow these instructions to install a beta release of C# for VS Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants