# git_ui: Only register conflict addon for full mode editors \(\#30049\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 902931fdfcd8f768d9f96f1944fc6b5299e3f6ad

Requested commit: 902931fdfcd8f768d9f96f1944fc6b5299e3f6ad

Commit: 902931fdfcd8f768d9f96f1944fc6b5299e3f6ad

Tree: a7c6129e9b3b7f039f2a2761a86fbca811138e7b

Author: Finn Evers

Committer: GitHub

## Message

```
git_ui: Only register conflict addon for full mode editors (#30049)

Noticed this whilst working on #26893 

This PR prevents that single line and auto height editors have a
conflict addon attached (and are observed for any excerpt changes).


From how I understand it, it does not really make sense to register the
conflict addon for single line or auto height editors.

These editors will never show a conflict nor will they be used to
resolve one. Furthermore, neither of these ever have a project attached
upon creation:


https://github.com/zed-industries/zed/blob/00c5f57575b5de69a5007ba724b4a8fb10db91ac/crates/editor/src/editor.rs#L1385


https://github.com/zed-industries/zed/blob/00c5f57575b5de69a5007ba724b4a8fb10db91ac/crates/editor/src/editor.rs#L1403


https://github.com/zed-industries/zed/blob/00c5f57575b5de69a5007ba724b4a8fb10db91ac/crates/editor/src/editor.rs#L1415

so their buffers will never be added here:


https://github.com/zed-industries/zed/blob/00c5f57575b5de69a5007ba724b4a8fb10db91ac/crates/git_ui/src/conflict_view.rs#L116-L120

Thus, we could potentially even extend the check with an additional `||
editor.project.is_none()`. Yet, as I am not entirely sure how all of
this exactly works, I left this out for now, but I can definitely add
this if wanted.

Release Notes:

- N/A
```

## Parents

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

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