# pane: Fix apply formatting when new file is first created \(\#52692\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/219ea086f2b4dd058651e484b17f555c1adb4c34)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 219ea086f2b4dd058651e484b17f555c1adb4c34

Requested commit: 219ea086f2b4dd058651e484b17f555c1adb4c34

Commit: 219ea086f2b4dd058651e484b17f555c1adb4c34

Tree: e0fc7fca0da17b7bdc21f0f3559f621108d73190

Author: Bruna Fernandes

Committer: GitHub

## Message

```
pane: Fix apply formatting when new file is first created (#52692)

### Description:

Previously, formatting was only applied after manually saving the file,
once it had already been created and saved. After the fix, when creating
a new file from the editor and saving it for the first time with a
filename, formatting is automatically applied if “format on save” is
enabled.

### Self-Review Checklist:

- [X] I've reviewed my own diff for quality, security, and reliability
- [X] Unsafe blocks (if any) have justifying comments
- [X] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [X] Tests cover the new/changed behavior
- [X] Performance impact has been considered and is acceptable

Closes #22534

Release Notes:

- Fixed apply formatting when a new file is first created
```

## Parents

- [7dfe0fb3a4f4fb1c0a0bc580f0faaa8671b77bad](https://git.cafe/gitcafe/zed/commit/7dfe0fb3a4f4fb1c0a0bc580f0faaa8671b77bad?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/219ea086f2b4dd058651e484b17f555c1adb4c34?format=markdown)
