Skip to content

Conversation

@juancampa
Copy link
Contributor

@juancampa juancampa commented Jan 15, 2019

Problem

charsizechanged was being fired regardless of whether the actual char size changed or not.

Solution

Only fire the event when the "adjusted size" (rounded up) changes.

I ran into this bug because, when using the WebGL renderer, canvas resizes are very expensive on Chrome. This was causing the renderer to resize the canvas every time measure was called.

Tests

  • Terminal resizes up/down when changing the number of cols/rows
  • Terminal resizes up/down when changing the font size

@juancampa
Copy link
Contributor Author

@Tyriar let me know if there's other functionality you'd like me to test. So far it seems like nothing breaks

@Tyriar
Copy link
Member

Tyriar commented Jan 16, 2019

@juancampa you mentioned changing this caused some other bug, was that something in your local workspace?

@Tyriar Tyriar added this to the 3.11.0 milestone Jan 16, 2019
@Tyriar Tyriar self-assigned this Jan 16, 2019
@juancampa
Copy link
Contributor Author

juancampa commented Jan 16, 2019 via email

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.

2 participants