dotnet / dotnet/fsharp

improve smart indentation

Open
#2,848 2 comments 0 reactions 0 assignees View on GitHub
Area-VS-Editor Feature Improvement
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

#### Repro steps

1. define a function which spans several lines
1. move carret on last line
1. press Enter, and then Backspace, then Enter

#### Expected behavior

The cursor remains indented to the same level as the one obtained after pressing Backspace

#### Actual behavior

The indentation jumps back to the indeted level corresponding to last line of the function, the way it works in VS2015.

#### Known workarounds

None

#### Related information

The way it behaves in VS2015:
![cursor vs2015](https://cloud.githubusercontent.com/assets/87944/25003903/e68d4294-2051-11e7-827b-cd934bc710d4.gif)

The way it behaves in VS2017:
![cursor vs2017](https://cloud.githubusercontent.com/assets/87944/25003909/efb1c804-2051-11e7-9d89-4d7217f201bb.gif)

In both, I have this Tabs settings:

![image](https://cloud.githubusercontent.com/assets/87944/25003919/ff0f457e-2051-11e7-8967-711433289fc9.png)

The change in behaviour is rather annoying with muscle memory, and if it was unintended, this might be considered as a bug.

Provide any related information

* Win 7 pro 64
* using latest VS2017 F# nightly 15.4.1.17032701 (but it doesn't matter, it behaves this way since any version of VS2017)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.