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
{{ message }}
Repository navigation
Double clicking variable selects variable, but copying and pasting does not have the $ symbol #240
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.
Hi Deshi Rahim (@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.
Activity
daviwil commentedon Sep 8, 2016
Hi Deshi Rahim (@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.
deshiknaves commentedon Sep 11, 2016
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.
daviwil commentedon Sep 12, 2016
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.