Skip to content

Send document Uri instead of path for extension command execution #811

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

Merged
merged 1 commit into from
May 31, 2017

Conversation

daviwil
Copy link
Contributor

@daviwil daviwil commented May 31, 2017

This change fixes an issue which causes the language server to crash
when running a registered $psEditor command from within an untitled
file. This happens because the workspace code in the language server
expects to receive Uri paths instead of local file paths when referring
to an editor buffer. The fix is to send the untitled file's Uri instead
of its non-existent file path.

Resolves #810.
Resolves PowerShell/PowerShellEditorServices #434.

This change fixes an issue which causes the language server to crash
when running a registered $psEditor command from within an untitled
file.  This happens because the workspace code in the language server
expects to receive Uri paths instead of local file paths when referring
to an editor buffer.  The fix is to send the untitled file's Uri instead
of its non-existent file path.

Resolves PowerShell#810.
Resolves PowerShell/PowerShellEditorServices PowerShell#434.
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

Successfully merging this pull request may close these issues.

$pseditor.GetEditorContext().CurrentFile.GetTextLines() throws on Untitled (never saved) file
2 participants