ZIm/crates/git_ui
Finn Evers 902931fdfc
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:


00c5f57575/crates/editor/src/editor.rs (L1385)


00c5f57575/crates/editor/src/editor.rs (L1403)


00c5f57575/crates/editor/src/editor.rs (L1415)

so their buffers will never be added here:


00c5f57575/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
2025-05-07 16:10:08 -04:00
..
src git_ui: Only register conflict addon for full mode editors (#30049) 2025-05-07 16:10:08 -04:00
Cargo.toml Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
LICENSE-GPL Add placeholder git panel (#21894) 2024-12-11 22:13:52 -05:00