A new line is highlighted per character when typing with unclosed "

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 8 years and 3 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.
User avatar
pdearmen
Posts: 66
Last visit: Tue Apr 02, 2024 2:21 pm

A new line is highlighted per character when typing with unclosed "

Post by pdearmen »

Product, version and build: Powershell Studio 4.2.99
32 or 64 bit version of product: 64
Operating system: Windows 10 (latest patches as of 1/11/2016)
32 or 64 bit OS: 64
Severity: annoyance (not critical or affecting code that I can see - just annoys me when working on large projects)

Steps to reproduce:
Assume the following code segment:
$pinfo = New-Object System.Diagnostics.ProcessStartInfo
$pinfo.FileName = "powershell.exe"
$pinfo.RedirectStandardError = $true
$pinfo.RedirectStandardOutput = $true
$pinfo.UseShellExecute = $false
$pinfo.createnowindow = $true

if while working on line 2 i go back to edit it to and erase the closing ", for each character (space or otherwise) that I type after the opening " before closing it - a new line is highlighted as though it is enclosed in the "
step 1 - just using the backspace key to remove the " results in one line being highlighted
step 1 - just using the backspace key to remove the " results in one line being highlighted
removingQuotationMark.PNG (7.24 KiB) Viewed 1725 times
step 2 - adding a space
step 2 - adding a space
addaspace.PNG (10.88 KiB) Viewed 1725 times
step 3+ and finally adding another "
step 3+ and finally adding another "
closingQuotationresolvesit.PNG (7.37 KiB) Viewed 1725 times
Thanks for all you do - love Powershell studio
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: A new line is highlighted per character when typing with unclosed "

Post by davidc »

I can understand the frustration of the string syntax coloring while editing. This is an unfortunately side effect of the PowerShell language specification, which supports multi-line strings and is one of the main reasons we added auto-quote completion.

David
David
SAPIEN Technologies, Inc.
This topic is 8 years and 3 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.