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

Terminal widget blink when resizing #12280

Closed
meng-jpg opened this issue Mar 10, 2023 · 2 comments · Fixed by #12587
Closed

Terminal widget blink when resizing #12280

meng-jpg opened this issue Mar 10, 2023 · 2 comments · Fixed by #12587
Labels
terminal issues related to the terminal

Comments

@meng-jpg
Copy link
Contributor

Bug Description:

When I drag to adjust the window size of the application, the contents of the terminal widget will blink until I stop dragging.
To resolve this, maybe the following code can be changed:

packages/terminal/src/browser/terminal-widget-impl.ts

protected resizeTerminal(): void {
        const geo = this.fitAddon.proposeDimensions();
        const cols = geo.cols;
        const rows = geo.rows - 1; // subtract one row for margin
        this.term.resize(cols, rows);
    }

=>

// import debounce = require('p-debounce');
protected override resizeTerminal = debounce(() => {
        const geo = this.fitAddon.proposeDimensions();
        const cols = geo.cols;
        const rows = geo.rows - 1; // subtract one row for margin
        this.term.resize(cols, rows);
    }, 0);

Steps to Reproduce:

1.start theia electron
2.open a new terminal
3.resize the window

Additional Information

  • Operating System: macOS Big Sur 11.2
  • Theia Version: 1.34.0
@vince-fugnitto vince-fugnitto added the terminal issues related to the terminal label Mar 13, 2023
@vince-fugnitto
Copy link
Member

@meng-jpg thank you for reporting the issue, I believe that the flickering also happens in VS Code (which also uses xterm), but if you'd like to try and contribute a fix please don't hesitate to do so! 👍

@meng-jpg
Copy link
Contributor Author

@meng-jpg thank you for reporting the issue, I believe that the flickering also happens in VS Code (which also uses xterm), but if you'd like to try and contribute a fix please don't hesitate to do so! 👍
Thank you for your suggestion.
#12320

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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants