Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example is wrong in "Manipulating the user's active file buffer" #223

Closed
gerane opened this issue May 13, 2016 · 1 comment
Closed

Example is wrong in "Manipulating the user's active file buffer" #223

gerane opened this issue May 13, 2016 · 1 comment

Comments

@gerane
Copy link
Contributor

gerane commented May 13, 2016

Example found here https://powershell.github.io/PowerShellEditorServices/guide/extensions.html

# Insert new text replacing the user's current selection
$context = $psEditor.GetEditorContext()
$context.InsertText("# All your script are belong to us", $context.SelectedRange)

Should be

# Insert new text replacing the user's current selection
$context = $psEditor.GetEditorContext()
$context.currentfile.InsertText("# All your script are belong to us", $context.SelectedRange)
@daviwil
Copy link
Contributor

daviwil commented May 13, 2016

Thanks for filing this!

daviwil added a commit that referenced this issue May 13, 2016
Fix #223: Wrong InsertText call in extension docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants