From dedb2af992a8a9b890f544d5fd8e83086f856eed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Schw=C3=A4mmle?=
<50438383+felixschwamm@users.noreply.github.com>
Date: Sun, 31 May 2026 20:42:51 +0200
Subject: [PATCH] keymap_editor: Fix create keybinding button clipping out of
editor (#54708)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
In the keymap editor, the search input at the top used `size_full()`
while the
adjacent button row had `min_w_96()`. On narrow panes (e.g. side-by-side
splits), this caused the action buttons — including "Create keybinding"
— to
overflow and clip out of the editor.
This change lets the search input flex and shrink (`flex_1()` +
`min_w_0()`),
and makes the button row `flex_none()` so it keeps its natural width and
stays visible at any pane size.
## Before / After
## Test plan
- [x] Open the keymap editor (`zed: open keymap editor`)
- [x] Confirm the "Create keybinding" and other action buttons remain
visible
- [x] Confirm the search input shrinks gracefully instead of pushing
buttons off-screen
Co-authored-by: Lukas Wirth
---
crates/keymap_editor/src/keymap_editor.rs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/crates/keymap_editor/src/keymap_editor.rs b/crates/keymap_editor/src/keymap_editor.rs
index 6a6856e4e6..54c54ab1fc 100644
--- a/crates/keymap_editor/src/keymap_editor.rs
+++ b/crates/keymap_editor/src/keymap_editor.rs
@@ -2019,7 +2019,8 @@ impl Render for KeymapEditor {
context.add("BufferSearchBar");
context
})
- .size_full()
+ .flex_1()
+ .min_w_0()
.h_8()
.pl_2()
.pr_1()
@@ -2032,7 +2033,7 @@ impl Render for KeymapEditor {
.child(
h_flex()
.gap_1()
- .min_w_96()
+ .flex_none()
.items_center()
.child(
IconButton::new(