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

Restore re-rendering of editors on buffer font size changes #4064

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

maxbrunsfeld
Copy link
Collaborator

@maxbrunsfeld maxbrunsfeld commented Jan 15, 2024

Now that views are cached, we need to explicitly .notify() text editors when the buffer font size changes.

  • Notify editors when settings change, or adjusting buffer font size
  • Figure out why non-focused editors still do not re-render when adjusting buffer font size
  • Reset buffer font size adjustment when the size is updated in the user's settings

@@ -2761,6 +2761,8 @@ impl<'a, V: 'static> ViewContext<'a, V> {
.rendered_frame
.dispatch_tree
.view_path(self.view.entity_id())
.into_iter()
.rev()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

/cc @as-cii could you double check that this is correct? Without this, I think that if two views with common ancestors both call .notify(), the second one will bail out before pushing the Notify effect.

Copy link
Member

Choose a reason for hiding this comment

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

That makes total sense, thanks for the fix!

@maxbrunsfeld maxbrunsfeld merged commit deac172 into main Jan 16, 2024
3 checks passed
@maxbrunsfeld maxbrunsfeld deleted the refresh-on-buffer-font-size-change branch January 16, 2024 01:13
SomeoneToIgnore added a commit that referenced this pull request Feb 23, 2025
Closes #25413

As the issue points out well, themes do not need to alter any in-memory
state on load: that is done via settings file load.
Originally, it was introduced in
#4064 and
#24857 had restored that
behavior, which seems wrong to do.

Apart from removing that part, removes unnecessary methods and
emphasizes that in-memory state is the Buffer/UI size — no need to add
`Adjusted` there as the settings file presence is already enough.

Release Notes:

- Fixed theme selector resetting the buffer size
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