[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.
Bosparan
Posts: 284
Joined: Sun Mar 03, 2013 12:45 pm

[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: 542
Joined: Thu Jun 01, 2017 7:20 am

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 Ryn
SAPIEN Technologies, Inc.