Skip to content

terminal: Reduce flicker on resize - #47195

Merged
probably-neb merged 3 commits into
zed-industries:mainfrom
pigletfly:fix-terminal-blink
Apr 27, 2026
Merged

terminal: Reduce flicker on resize#47195
probably-neb merged 3 commits into
zed-industries:mainfrom
pigletfly:fix-terminal-blink

Conversation

@pigletfly

@pigletfly pigletfly commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Skip PTY resizes for pixel-only changes and coalesce pending resize events.
Snap standalone terminal layout to whole device pixels to avoid subpixel jitter.

before:

Screen.Recording.2026-01-20.at.16.43.22.mov

after:

Screen.Recording.2026-01-20.at.16.41.43.mov

Release Notes:

  • Fixed: Reduce terminal flicker on resize

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jan 20, 2026
@MrSubidubi MrSubidubi changed the title fix(terminal): Reduce flicker on resize terminal: Reduce flicker on resize Jan 20, 2026
  Skip PTY resizes for pixel-only changes and coalesce pending resize events.
  Snap standalone terminal layout to whole device pixels to avoid subpixel jitter.

Signed-off-by: pigletfly <wangbing.adam@gmail.com>
@niekdomi

Copy link
Copy Markdown
Contributor

No clue how hard this would be to implement, though: Why not just "fix" the terminal at the bottom, so the text wouldn't move at all when resizing?

@probably-neb

probably-neb commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

If you could please fix the compile errors, I think this is about ready to merge

The existing test used `#[test]` and created a `TerminalBuilder`
directly. This commit updates the test to use the `#[gpui::test]`
attribute and `TestAppContext` to ensure that the test runs within the
GPUI executor, which is necessary for correctly handling timers and
other async operations within GPUI tests. The `TerminalBuilder` creation
is also wrapped in `cx.update` to ensure it's built within the GPUI
context.
@pigletfly

Copy link
Copy Markdown
Contributor Author

If you could please fix the compile errors, I think this is about ready to merge

PTAL

@probably-neb
probably-neb added this pull request to the merge queue Apr 27, 2026
Merged via the queue into zed-industries:main with commit e2f7416 Apr 27, 2026
31 checks passed
ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
Skip PTY resizes for pixel-only changes and coalesce pending resize
events.
Snap standalone terminal layout to whole device pixels to avoid subpixel
jitter.

before:


https://github.com/user-attachments/assets/0ad0db83-0099-44c8-b8d1-3dc8146b25ef


after:


https://github.com/user-attachments/assets/86278014-1c87-4263-a9e5-b58bcc1fa2ea




Release Notes:

- Fixed: Reduce terminal flicker on resize

---------

Signed-off-by: pigletfly <wangbing.adam@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
kathbigra pushed a commit to kathbigra/zed that referenced this pull request May 10, 2026
Skip PTY resizes for pixel-only changes and coalesce pending resize
events.
Snap standalone terminal layout to whole device pixels to avoid subpixel
jitter.

before:


https://github.com/user-attachments/assets/0ad0db83-0099-44c8-b8d1-3dc8146b25ef


after:


https://github.com/user-attachments/assets/86278014-1c87-4263-a9e5-b58bcc1fa2ea




Release Notes:

- Fixed: Reduce terminal flicker on resize

---------

Signed-off-by: pigletfly <wangbing.adam@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
@pigletfly
pigletfly deleted the fix-terminal-blink branch May 14, 2026 01:16
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
Skip PTY resizes for pixel-only changes and coalesce pending resize
events.
Snap standalone terminal layout to whole device pixels to avoid subpixel
jitter.

before:


https://github.com/user-attachments/assets/0ad0db83-0099-44c8-b8d1-3dc8146b25ef


after:


https://github.com/user-attachments/assets/86278014-1c87-4263-a9e5-b58bcc1fa2ea




Release Notes:

- Fixed: Reduce terminal flicker on resize

---------

Signed-off-by: pigletfly <wangbing.adam@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
Skip PTY resizes for pixel-only changes and coalesce pending resize
events.
Snap standalone terminal layout to whole device pixels to avoid subpixel
jitter.

before:


https://github.com/user-attachments/assets/0ad0db83-0099-44c8-b8d1-3dc8146b25ef


after:


https://github.com/user-attachments/assets/86278014-1c87-4263-a9e5-b58bcc1fa2ea




Release Notes:

- Fixed: Reduce terminal flicker on resize

---------

Signed-off-by: pigletfly <wangbing.adam@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants