# docs: Improve documentation of ensure final new line on save \(\#25960\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6327a5d665e960f30cdde1c50f3f8b5c554836da

Requested commit: 6327a5d665e960f30cdde1c50f3f8b5c554836da

Commit: 6327a5d665e960f30cdde1c50f3f8b5c554836da

Tree: f7acd76674265766e48bef00032da2017b7f714d

Author: Devzeth

Committer: GitHub

## Message

```
docs: Improve documentation of ensure final new line on save (#25960)

The function ensure_final_newline in buffer.rs has this explanation:
Ensures that the buffer ends with a single newline character, no other
whitespace.

The documentation wasn't explaining well that we actually remove any
lines containing only whitespace and keep only 1 line at the end of a
buffer.

Release Notes:

- N/A

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
Co-authored-by: Danilo Leal <danilo@zed.dev>
```

## Parents

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

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