Skip to content

Commit

Permalink
extension: fix stdin-filepath for non-file documents
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Nov 17, 2024
1 parent a7dae57 commit b928a2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions stylua-vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ To view the changelog of the StyLua binary, see [here](https://github.com/Johnny

## [Unreleased]

### Fixed

- Skip `--stdin-filepath` when handling non-file based text documents (e.g., untitled documents)

## [1.7.0] - 2024-11-16

### Changed
Expand Down
2 changes: 1 addition & 1 deletion stylua-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export async function activate(context: vscode.ExtensionContext) {
outputChannel,
styluaBinaryPath.path,
text,
document.uri.fsPath,
document.uri.scheme === "file" ? document.uri.fsPath : undefined,
cwd,
byteOffset(document, range.start),
byteOffset(document, range.end)
Expand Down

0 comments on commit b928a2a

Please sign in to comment.