You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will
be closed until separated. -->
### Description
This PR fixes an issue where the view would be reloaded too often. This
happened because `updateNSViewController` is called too often. This
mostly happens because of a change in the environment, which gets passed
to the NSViewControllerRepresentable in the `context` variable.
Manual diffing is applied to check if any variables that matter have
changed. If not, nothing is updated.
The initializer has also changed, a few variables are now just values
instead of bindings. These don't have to be bindings, as the textview
won't update variables.
### Related Issues
CodeEditApp/CodeEdit#1247
### Checklist
<!--- Add things that are not yet implemented above -->
- [x] I read and understood the [contributing
guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)
as well as the [code of
conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code
### Screenshots
<!--- REQUIRED: if issue is UI related -->
<!--- IMPORTANT: Fill out all required fields. Otherwise we might close
this PR temporarily -->
Signed-off-by: Wouter01 <[email protected]>
0 commit comments