Skip to content

Commit ad2ff93

Browse files
authored
Fix handling BOM when user Rejects apply_diff (#3960)
Related issue is #1483, related pull request is #1500 - but it looks like it missed the revert of proposed diff case
1 parent 6ebc95d commit ad2ff93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/integrations/editor/DiffViewProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export class DiffViewProvider {
278278
updatedDocument.positionAt(updatedDocument.getText().length),
279279
)
280280

281-
edit.replace(updatedDocument.uri, fullRange, this.originalContent ?? "")
281+
edit.replace(updatedDocument.uri, fullRange, this.stripAllBOMs(this.originalContent ?? ""))
282282

283283
// Apply the edit and save, since contents shouldnt have changed
284284
// this won't show in local history unless of course the user made

0 commit comments

Comments
 (0)