Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize terminal process after resizing widget #13281

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

Lythenas
Copy link
Contributor

What it does

Fixes #13174

Resize the terminal process in the debounced doResizeTerminal (after the terminal widget has the new size) instead of directly in the onUpdateRequest.

Contributed on behalf of Elektrobit Automotive GmbH.

How to test

  1. Start theia, open it in a browser
    • It's a bit inconsistent to reproduce, since it is a race condition. I found that setting a breakpoint on packages/terminal/src/browser/terminal-widget-impl.ts:604 (i.e. in onUpdateRequest) and stepping through always reproduces the issue.
  2. Open a terminal
  3. Run tput cols and tput lines, see that it is the incorrect size (defaults to 80 and 24, instead of the real size of the terminal widget after it is fix into the view)
  4. Try to write a very long line, see that it wraps as 80 characters even though there is still space left
  5. Resize the terminal (just wiggling is fine)
  6. Do step 3 and 4 again and see that it now shows the correct size and behaves correctly

With this PR step 3 and 4 should behave correctly. I.e. the size of the terminal is correct after opening, without having to resize.

Follow-ups

Review checklist

Reminder for reviewers

Resize the terminal process in the debounced doResizeTerminal (after the
terminal widget has the new size).

Contributed on behalf of Elektrobit Automotive GmbH

Signed-off-by: Matthias Seiffert <matthias.seiffert@elektrobit.com>
@Lythenas Lythenas force-pushed the fix-incorrect-terminal-size branch from ebae2e8 to dc0c1eb Compare January 17, 2024 12:18
@msujew msujew added the terminal issues related to the terminal label Jan 18, 2024
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the fix @Lythenas 👍

@msujew msujew merged commit b4bbecd into eclipse-theia:master Jan 18, 2024
14 checks passed
@jfaltermeier jfaltermeier added this to the 1.46.0 milestone Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terminal issues related to the terminal
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Terminal starts with incorrect size
3 participants