keymap_editor: Fix create keybinding button clipping out of editor (#54708)

## 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

<img width="2227" height="475" alt="Screenshot 2026-04-23 215511"
src="https://github.com/user-attachments/assets/f3d79922-13e4-486b-b2b0-62ffa5d5b1a2"
/>

## 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 <lukas@zed.dev>
This commit is contained in:
Felix SchwämmleandLukas Wirth authored and GitHub committed 2026-05-31 18:42:51 +00:00
1 parent f4f527073d
commit dedb2af992
1 file changed
+3 -2
+3 -2
View File
@@ -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(