Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Add emulator padding and solidify fit #473

Merged
merged 7 commits into from
May 19, 2017
Merged

Add emulator padding and solidify fit #473

merged 7 commits into from
May 19, 2017

Conversation

notnotdrew
Copy link
Member

@notnotdrew notnotdrew commented May 19, 2017

closes #464

While working on this, I discovered a few more ways to break the emulator fit—so that is addressed here as well and seems to be pretty solid now.

this.emulator.fit();
// Two calls are necessary to properly fit after the font-size has changed
this.emulator.fit()
this.emulator.fit()
Copy link
Member Author

Choose a reason for hiding this comment

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

@ktravers if you're interested, this is the magic that seems to have guaranteed, finally (the last attempt actually could still break), that the emulator will fit inside its panel 🙄

I think what's happening is that the first call to emulator.fit() is pushing xterm to adjust to font-size changes we've made, and the second call is then taking that and actually fitting the emulator in its container. That's just a hunch though. Whatever it is, it works 🤷‍♂️

@notnotdrew notnotdrew merged commit 13a0494 into master May 19, 2017
@notnotdrew notnotdrew deleted the terminal-padding branch May 19, 2017 16:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add padding between first character and edge of terminal
1 participant