Skip to content

Conversation

@dan-stowell
Copy link
Contributor

Currently, if you press the full-screen button on a terminal in the UI, it will enter full-screen but not re-render the text to take advantage of all the space. Clicking inside the terminal causes a re-render.

Screenshot 2025-10-03 at 1 04 15 PM

With this change, the text re-renders the moment the terminal enters full screen.
Screenshot 2025-10-03 at 1 04 58 PM

Copy link
Member

@bduffany bduffany left a comment

Choose a reason for hiding this comment

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

ah, so the previous code was intending to do this already, but the current logic just returns a function reference instead of actually evaluating the function. Nice catch 👍

Comment on lines 105 to 107
window.addEventListener("keydown", (this.windowKeyDownListener = this.onWindowKeyDown.bind(this)));
window.addEventListener("fullscreenchange", (this.fullScreenListener = () => this.forceUpdate.bind(this)));
window.addEventListener("fullscreenchange", (this.fullScreenListener = () => this.forceUpdate()));
window.addEventListener("resize", (this.resizeListener = this.updateLineLengthLimit.bind(this)));
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe use arrow functions instead of bind in the other listeners too? just for consistency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change does use arrows? Previous code used bind? Or am I misunderstanding?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Other listeners." Sorry, yeah, I'll do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@dan-stowell dan-stowell merged commit 9fcc960 into master Oct 6, 2025
13 checks passed
@dan-stowell dan-stowell deleted the dan-term-full-screen branch October 6, 2025 16:25
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