Skip to content

input: Update paint argument for GPUI API change.#1839

Merged
huacnlee merged 1 commit intolongbridge:mainfrom
18o:input
Dec 22, 2025
Merged

input: Update paint argument for GPUI API change.#1839
huacnlee merged 1 commit intolongbridge:mainfrom
18o:input

Conversation

@18o
Copy link
Contributor

@18o 18o commented Dec 21, 2025

Description

Fix the input element break caused by PR zed-industries/zed#45417

Copilot AI review requested due to automatic review settings December 21, 2025 11:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a breaking change in the ShapedLine::paint API that was introduced in PR #45417. The API now requires two additional parameters: TextAlign and an optional max width. The fix adds these parameters to all ShapedLine::paint calls in the input UI components.

Key Changes

  • Added TextAlign import to both text_wrapper.rs and element.rs
  • Updated four ShapedLine::paint calls to include TextAlign::Left and None as the new required parameters
  • Updated gpui and related dependencies to a newer commit that includes the API changes

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
crates/ui/src/input/text_wrapper.rs Added TextAlign import and updated internal ShapedLine::paint call with new parameters
crates/ui/src/input/element.rs Added TextAlign import and updated three ShapedLine::paint calls (ghost lines, line numbers, and completion text) with new parameters
Cargo.lock Updated gpui and related dependencies to commit 213cb30, consolidated wayland-protocols versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@huacnlee huacnlee changed the title fix(text): ensure text alignment is explicitly set in all paint calls input: Update paint argument for GPUI API change. Dec 21, 2025
@huacnlee huacnlee merged commit 2507a20 into longbridge:main Dec 22, 2025
9 checks passed
@huacnlee
Copy link
Member

Thanks

@18o 18o deleted the input branch December 22, 2025 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants