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

Indentation falls back to column 0 after second line break #1980

Closed
cartermp opened this issue Dec 9, 2016 · 3 comments
Closed

Indentation falls back to column 0 after second line break #1980

cartermp opened this issue Dec 9, 2016 · 3 comments
Labels
Area-LangService-API Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.

Comments

@cartermp
Copy link
Contributor

cartermp commented Dec 9, 2016

In latest master, type the following:

let getStringAsync(str: string) = async { return str }

let fooAsync() = async {
    let! str1 = getStringAsync "hello"    
}

Now, hit enter. Notice that the cursor is at the same column as the above let! binding, column 5:

let getStringAsync(str: string) = async { return str }

let fooAsync() = async {
    let! str1 = getStringAsync "hello"    
//  |  <--- cursor is here
}

Now, hit enter again:

Expected: Cursor is on a new line, and still on column 5.

Actual: Cursor is at column 1.

screen shot 2016-12-09 at 11 00 36 am

@cartermp cartermp added Area-LangService-API Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. labels Dec 9, 2016
@vasily-kirichenko
Copy link
Contributor

Yes, it's an annoying bug.

@abelbraaksma
Copy link
Contributor

abelbraaksma commented Dec 10, 2016

Check if you have Smart indent switched on. Try it with Block indent. This may be related to a bug introduced with Update 3, see my report on smart-indent here.

Conversely, if you fix this issue, check if it retrospectively fixes #1588 as well.

@cartermp
Copy link
Contributor Author

@abelbraaksma Thanks for pointing that out! We should definitely address that if it's feasible for this release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-API Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
None yet
Development

No branches or pull requests

3 participants