[PSS 2020][Bug] After open curly braces, add extra line

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 3 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Bosparan
Posts: 290
Last visit: Fri Oct 08, 2021 11:59 am

[PSS 2020][Bug] After open curly braces, add extra line

Post by Bosparan »

PSS Version: 2018 5.7.179x64
OS Version: Windows 10 x64 1903
WMF Version: 5.1

Impact: Minor

Symptoms:

When you open a curly brace with the option to automatically close it enabled and then hit enter, it correctly moves the cursor down one line and the closing brace to the line after.
If however instead you hit the "END" key, and then hit enter, it will add a new line under you (and add some odd indentation levels in some cases).

Reproducibility:

Type the following line with the option, to auto-close curly braces enabled:

Code: Select all

if ($true) { Write-Host "Hello World" }
After typing the closing quote, hit "END" to jump to the end of the line, rather than actually type out the closing braces.
Then hit "ENTER"
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: [PSS 2020][Bug] After open curly braces, add extra line

Post by brittneyr »

I have not been able to reproduce this behavior of an extra line being added after the steps you have provided. I did notice that a end line token was sometimes added (shown with the option 'Show white spaces' enabled). When you hit enter, the line was formatted and the cursor moves to the next line as expected.
Brittney
SAPIEN Technologies, Inc.
This topic is 3 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.