Skip to content

Commit

Permalink
fix crlf text file creation on windows (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryuck authored Dec 8, 2023
1 parent d145a6d commit c8fe689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/features.v
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn (mut ls Vls) formatting(params lsp.DocumentFormattingParams, mut wr Respo
// To simplify this, we will make a temporary file and feed it into
// the v fmt CLI program since there is no cross-platform way to pipe
// raw strings directly into v fmt.
mut temp_file := os.open_file(server.temp_formatting_file_path, 'w')!
mut temp_file := os.open_file(server.temp_formatting_file_path, 'wb')!
temp_file.write_string(source.string())!
temp_file.close()
defer {
Expand Down

0 comments on commit c8fe689

Please sign in to comment.