workspace: Fix read-only pane buttons being clickable even when a no-op (#46065)

The button was clickable for read-only panes even if the underlying item
is not write-toggleable.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2026-01-05 11:27:46 +01:00
committed by GitHub
parent e57285fe39
commit 9cdb986fd4
7 changed files with 51 additions and 35 deletions
+4
View File
@@ -1198,6 +1198,10 @@ impl MultiBuffer {
!self.capability.editable()
}
pub fn capability(&self) -> Capability {
self.capability
}
/// Returns an up-to-date snapshot of the MultiBuffer.
#[ztracing::instrument(skip_all)]
pub fn snapshot(&self, cx: &App) -> MultiBufferSnapshot {