Skip to content

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

Closed

Description

@cartermp

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

Activity

  1. added
    Impact-Low
    on Dec 9, 2016
  2. vasily-kirichenko commented on Dec 10, 2016

    @vasily-kirichenko
    Contributor

    Yes, it's an annoying bug.

  3. added a commit that references this issue on Dec 10, 2016
    9984b9c
  4. abelbraaksma commented on Dec 10, 2016

    @abelbraaksma
    Contributor

    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.

  5. cartermp commented on Dec 10, 2016

    @cartermp
    ContributorAuthor

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

  6. added a commit that references this issue on Jan 26, 2022
    927b04b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-LangService-APIBugImpact-Low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions