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

VS 2019 Preview 3.0 F# Re-Format indentation on paste option removes all indentation. #6281

Closed
vsfeedback opened this issue Feb 26, 2019 · 2 comments

Comments

@vsfeedback
Copy link

vsfeedback commented Feb 26, 2019

Formatting edited by @cartermp

Open or create an F# project, a console application will do. Ensure the Re-format indentation on paste option is enables in the F# settings of the text editor.

Cut or copy 2 or more lines of indented code, say from inside a function. Then paste anywhere, including back over the still selected region that was copied. All indentation is removed.

Turning off the F# Re-format indentation on paste option leave the indentation intact but of course doesn't then indent it correctly for the new location where it is pasted either.

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/465378/vs-2019-preview-30-f-re-format-indentation-on-past.html
VSTS ticketId: 797946

These are the original issue comments:

Visual Studio Feedback System on 2/21/2019, 11:53 PM (3 days ago):

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

--

David on 2/22/2019, 04:24 AM (3 days ago):

Further clarification on how to reproduce this:

Drag select the lines from the left of the text editor (on the line numbers if enabled). Ctrl+C to copy the current line without a selection or selecting a portion of text starting part way across a line doesn't exhibit this behaviour, it must be whole lines that are selected.

These are the original issue solutions:
(no solutions)

@cartermp
Copy link
Contributor

cc @saul any ideas here?

@realparadyne
Copy link

I think you can close this. The issue I was having was because I didn't know about this:

#4702

The caret position is now critical to determining what indentation you end up with. If you just cut some lines and paste directly back again the caret is left aligned for the paste. Now I know what it is doing it looks like it is a good feature and not a bug!

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

No branches or pull requests

3 participants