You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you double a variable name, vscode-powershell will select the variable name with the $ sign. However, once you copy it to the clipboard and then paste it somewhere else, it does not contain the $ symbol.
The text was updated successfully, but these errors were encountered:
Hi @deshiknaves, I apologize for the long delay in responding to this issue. This could be a general issue with VS Code but I'll take a look today to see if we caused it somehow.
Without the extension, it doesn't highlight the $ before the variable name, so I figure there is some logic in the plugin that does that, but isn't updating the selection when copying it.
So I realized what was causing the confusion here: when you have the PowerShell extension installed, it uses the extension's language server to find "occurrences" of the symbol under the cursor. Since the language server knows how to identify the $ on the variable name, it gets included with the highlight on the variable when you put your cursor on it. This is confusing because it looks like the variable and the $ are both selected when only the variable name is actually selected.
The lack of selection on the $ is a problem caused by our syntax definition for the PowerShell language. I've filed an issue at our editor syntax repo to track this problem: PowerShell/EditorSyntax#23. I'll close this issue since we're tracking it at the other repo.
When you double a variable name, vscode-powershell will select the variable name with the $ sign. However, once you copy it to the clipboard and then paste it somewhere else, it does not contain the $ symbol.
The text was updated successfully, but these errors were encountered: