SIGN IN SIGN UP

input: Stop a single-line input from painting scrollbars (#2824)

Every input carried the editor scrollbar, so a single-line text field
painted a thumb at its right edge — a control the field does not have.
It is visible in any application that styles a bare `Input`: the thumb
sits inside the frame, over the text.

Only a multi-line input can scroll. A single-line input keeps its caret
in view by moving its own offset and never has a viewport a user could
drag, and since it does not soft-wrap it was getting `Scrollbar::new` —
both axes — rather than nothing.

The rest of `render` already gates editor behavior on `is_multi_line`
(`h_full`, the editor paddings); the scrollbar was the one part that did
not.

```diff
  .child(TextElement::new(entity.clone()).placeholder(self.placeholder.clone()))
- .child(EditorScrollbar::new(entity.clone()));
+ .when(self.shows_scrollbar(), |this| {
+     this.child(EditorScrollbar::new(entity.clone()))
+ });
```

`shows_scrollbar` is `pub(crate)` and exists so the decision has a name
and a test, rather than being an inline condition nobody can assert on.

Found while building an application on `gpui-base` directly, where an
unstyled `Input` shows exactly what Base draws and nothing else.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
J
Jason Lee committed
38b2f652874fec3c31e5a876443ee594c0fd9d04
Parent: ad097c4
Committed by GitHub <noreply@github.com> on 8/24/2026, 4:16:17 PM