git_ui: Fix indent guides not showing for file buffers in the commit view (#44166)

Follow up to https://github.com/zed-industries/zed/pull/44162 where my
strategy for not displaying the indent guides only in the commit message
was wrong given I ended up... disabling indent guides for all the
buffers. This PR adds a new method to the editor where we can disable it
for a specific buffer ID following the pattern of
`disable_header_for_buffer`.

Release Notes:

- N/A
This commit is contained in:
Danilo Leal
2025-12-04 16:47:27 -03:00
committed by GitHub
parent 9ae77ec3c9
commit bdb8caa42e
3 changed files with 20 additions and 4 deletions
+2 -1
View File
@@ -150,7 +150,6 @@ impl CommitView {
Editor::for_multibuffer(multibuffer.clone(), Some(project.clone()), window, cx);
editor.disable_inline_diagnostics();
editor.disable_indent_guides();
editor.set_expand_all_diff_hunks(cx);
editor
@@ -259,6 +258,8 @@ impl CommitView {
this.editor.update(cx, |editor, cx| {
editor.disable_header_for_buffer(message_buffer.read(cx).remote_id(), cx);
editor
.disable_indent_guides_for_buffer(message_buffer.read(cx).remote_id(), cx);
editor.insert_blocks(
[BlockProperties {